Files
wrkflw/tests/fixtures/gitlab-ci/.gitlab/ci/test.yml
bahdotsh 181b5c5463 feat: reorganize test files and delete manual test checklist
- Move test workflows to tests/workflows/
- Move GitLab CI fixtures to tests/fixtures/gitlab-ci/
- Move test scripts to tests/scripts/
- Move Podman testing docs to tests/
- Update paths in test scripts and documentation
- Delete MANUAL_TEST_CHECKLIST.md as requested
- Update tests/README.md to reflect new organization
2025-08-09 15:30:53 +05:30

63 lines
1.4 KiB
YAML

.test-template:
stage: test
dependencies:
- build
cache:
key:
files:
- Cargo.lock
paths:
- ${CARGO_HOME}
- target/
# Unit tests
unit-tests:
extends: .test-template
script:
- cargo test --lib
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "main"
# Integration tests
integration-tests:
extends: .test-template
script:
- cargo test --test '*'
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "main"
# Lint with clippy
lint:
extends: .test-template
dependencies: [] # No dependencies needed for linting
script:
- rustup component add clippy
- cargo clippy -- -D warnings
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "main"
# Check formatting
format:
extends: .test-template
dependencies: [] # No dependencies needed for formatting
script:
- rustup component add rustfmt
- cargo fmt -- --check
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "main"
# Deployment template
.deploy-template:
stage: deploy
script:
- echo "Deploying to ${ENVIRONMENT} environment"
- cp target/release/wrkflw /tmp/wrkflw-${ENVIRONMENT}
artifacts:
paths:
- /tmp/wrkflw-${ENVIRONMENT}
dependencies:
- build