-
Notifications
You must be signed in to change notification settings - Fork 40
77 lines (73 loc) · 2.28 KB
/
Copy pathci-python.yml
File metadata and controls
77 lines (73 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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@v6
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 }}