|
12 | 12 | LAMBDA_PATH: ${{ github.workspace }}/lambdas |
13 | 13 |
|
14 | 14 | jobs: |
15 | | - lint: |
16 | | - name: Lint specification and Python projects |
| 15 | + lint-specification: |
| 16 | + name: Lint specification |
17 | 17 | runs-on: ubuntu-latest |
18 | 18 |
|
19 | 19 | steps: |
20 | | - - uses: actions/checkout@v5 |
| 20 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 21 | + |
| 22 | + - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 |
| 23 | + with: |
| 24 | + node-version: "23.11.0" |
| 25 | + cache: "npm" |
| 26 | + |
| 27 | + - name: Install linting dependencies |
| 28 | + run: make install |
| 29 | + |
| 30 | + - name: Lint |
| 31 | + run: make lint |
| 32 | + |
| 33 | + - name: Check formatting |
| 34 | + run: make format-check |
| 35 | + |
| 36 | + lint-python: |
| 37 | + name: Lint Python projects |
| 38 | + runs-on: ubuntu-latest |
| 39 | + |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
21 | 42 |
|
22 | 43 | - name: Install poetry |
23 | 44 | run: pip install poetry==2.1.4 |
24 | 45 |
|
25 | | - # Base linting requires 3.8 due to APIM package dependencies. See root README for details under linting. |
26 | | - # Consider upgrading this and poetry deps if we move away from Azure DevOps to using the Proxygen tool. |
27 | | - - uses: actions/setup-python@v5 |
| 46 | + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c |
28 | 47 | with: |
29 | | - python-version: 3.8 |
30 | | - cache: 'poetry' |
31 | | - |
32 | | - - uses: actions/setup-node@v5 |
33 | | - with: |
34 | | - node-version: '23.11.0' |
35 | | - cache: 'npm' |
| 48 | + python-version: 3.11 |
| 49 | + cache: "poetry" |
36 | 50 |
|
37 | 51 | - name: Install linting dependencies |
38 | | - run: make install-node && poetry install --no-root |
| 52 | + run: poetry install --no-root |
| 53 | + working-directory: quality_checks |
39 | 54 |
|
40 | 55 | - name: Lint |
41 | | - run: make lint |
| 56 | + run: poetry run make lint |
| 57 | + working-directory: quality_checks |
| 58 | + |
| 59 | + - name: Check formatting |
| 60 | + run: poetry run make format-check |
| 61 | + working-directory: quality_checks |
| 62 | + |
| 63 | + lint-terraform: |
| 64 | + name: Lint Terraform projects |
| 65 | + runs-on: ubuntu-latest |
| 66 | + |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 69 | + |
| 70 | + - uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd |
| 71 | + with: |
| 72 | + terraform_version: "1.12.2" |
| 73 | + |
| 74 | + - name: Check formatting |
| 75 | + run: terraform fmt -check -recursive |
42 | 76 |
|
43 | 77 | testcoverage_and_sonarcloud: |
44 | 78 | name: Test Coverage and SonarCloud |
45 | 79 | runs-on: ubuntu-latest |
46 | 80 |
|
47 | 81 | steps: |
48 | | - - uses: actions/checkout@v5 |
| 82 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
49 | 83 |
|
50 | 84 | - name: Install poetry |
51 | 85 | run: pip install poetry==2.1.4 |
52 | 86 |
|
53 | | - - uses: actions/setup-python@v5 |
| 87 | + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c |
54 | 88 | with: |
55 | 89 | python-version: 3.11 |
56 | | - cache: 'poetry' |
| 90 | + cache: "poetry" |
57 | 91 |
|
58 | 92 | - name: Set up AWS credentials |
59 | 93 | env: |
@@ -110,7 +144,7 @@ jobs: |
110 | 144 | working-directory: delta_backend |
111 | 145 | id: delta |
112 | 146 | env: |
113 | | - PYTHONPATH: delta_backend/src:delta_backend/tests |
| 147 | + PYTHONPATH: delta_backend/src:delta_backend/tests |
114 | 148 | continue-on-error: true |
115 | 149 | run: | |
116 | 150 | poetry install |
@@ -141,12 +175,12 @@ jobs: |
141 | 175 | working-directory: lambdas/ack_backend |
142 | 176 | id: acklambda |
143 | 177 | env: |
144 | | - PYTHONPATH: ${{ env.LAMBDA_PATH }}/ack_backend/src:${{ github.workspace }}/ack_backend/tests |
| 178 | + PYTHONPATH: ${{ env.LAMBDA_PATH }}/ack_backend/src:tests:${{ env.SHARED_PATH }}/src |
145 | 179 | continue-on-error: true |
146 | 180 | run: | |
147 | | - poetry install |
148 | | - poetry run coverage run --source=src -m unittest discover || echo "ack-lambda tests failed" >> ../../failed_tests.txt |
149 | | - poetry run coverage xml -o ../../ack-lambda-coverage.xml |
| 181 | + poetry install |
| 182 | + poetry run coverage run --source=src -m unittest discover || echo "ack-lambda tests failed" >> ../../failed_tests.txt |
| 183 | + poetry run coverage xml -o ../../ack-lambda-coverage.xml |
150 | 184 |
|
151 | 185 | - name: Run unittest with coverage-mns-subscription |
152 | 186 | working-directory: lambdas/mns_subscription |
|
0 commit comments