CI - Python #1895
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI - Python | |
| on: | |
| pull_request: | |
| paths: | |
| - "**/*.py" | |
| - "**/*requirement*.txt" | |
| - "**/uv.lock" | |
| - ".github/workflows/ci-python.yml" | |
| merge_group: | |
| env: | |
| BASE_COMMIT: "" | |
| GH_TOKEN: ${{ github.token }} | |
| jobs: | |
| matrix-pytest: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| projects: [ | |
| { | |
| projectName: "sftp-outbound-transfer-lambda", | |
| projectRoot: "ops/services/02-eft/lambda_src/sftp_outbound_transfer", | |
| testsRoot: "ops/services/02-eft/lambda_src/sftp_outbound_transfer/tests", | |
| uvCommand: "uv sync", | |
| pytestCommand: "uv run pytest", | |
| pythonVersion: "3.13", | |
| }, | |
| { | |
| projectName: "locust", | |
| projectRoot: "apps/utils/locust_tests", | |
| testsRoot: "apps/utils/locust_tests", | |
| uvCommand: "uv sync --group lambda-run-locust", | |
| # no tests | |
| pytestCommand: "echo 'no tests'", | |
| pythonVersion: "3.13", | |
| }, | |
| { | |
| projectName: "idr-pipeline", | |
| projectRoot: "apps/bfd-pipeline-idr", | |
| testsRoot: "apps/bfd-pipeline-idr", | |
| uvCommand: "uv sync", | |
| pytestCommand: "uv run pytest", | |
| pythonVersion: "3.14", | |
| }, | |
| ] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| id: code-checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: ${{ inputs.branch }} | |
| # Maven is needed to run the migrator | |
| - name: "Setup JDK" | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "25" | |
| distribution: "corretto" | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Run Python Tests per project | |
| id: run-pytest-set | |
| run: | | |
| echo "Testing ${{ matrix.projects.projectName }}" | |
| cd ${{ github.workspace }}/${{ matrix.projects.projectRoot }} | |
| uv python install | |
| ${{ matrix.projects.uvCommand }} | |
| # check linting | |
| uv run ruff check | |
| # check formatting | |
| uv run ruff format --check | |
| # check types | |
| uv run pyright . | |
| # tests | |
| ${{ matrix.projects.pytestCommand }} ${{ github.workspace }}/${{ matrix.projects.testsRoot }} |