Skip to content

Commit 47147cf

Browse files
Merge branch 'main' into test-exceptions
2 parents c59de26 + f4011bd commit 47147cf

File tree

3 files changed

+38
-13
lines changed

3 files changed

+38
-13
lines changed

.github/workflows/check-build-deploy.yaml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ jobs:
5454
needs: [uv-check]
5555
runs-on: ubuntu-latest
5656

57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
component: [package, tests]
61+
5762
steps:
5863
- uses: actions/checkout@v6
5964

@@ -68,7 +73,17 @@ jobs:
6873
enable-cache: true
6974

7075
- name: Install mypy From Locked Dependencies
71-
run: uv sync --no-group dev --group type-check
76+
run: |
77+
if [ "${{matrix.component}}" == "package" ]; then
78+
ARGS=""
79+
elif [ "${{matrix.component}}" == "tests" ]; then
80+
ARGS="--group test"
81+
else
82+
echo "Error: Unknown matrix.component value: '${{matrix.component}}'" >&2
83+
exit 1
84+
fi
85+
86+
uv sync --no-group dev --group type-check $ARGS
7287
7388
- id: store-hashed-python-version
7489
name: Store Hashed Python Version
@@ -77,11 +92,21 @@ jobs:
7792

7893
- uses: actions/cache@v4
7994
with:
80-
key: mypy|${{steps.store-hashed-python-version.outputs.hashed_python_version}}
95+
key: mypy|${{steps.store-hashed-python-version.outputs.hashed_python_version}}|${{matrix.component}}
8196
path: ./.mypy_cache
8297

83-
- name: Run mypy
84-
run: uv run -- mypy . # TODO: Add GitHub workflows output format
98+
- name: Run mypy # TODO: Add GitHub workflows output format
99+
run: |
100+
if [ "${{matrix.component}}" == "package" ]; then
101+
ARGS=". --exclude tests/"
102+
elif [ "${{matrix.component}}" == "tests" ]; then
103+
ARGS="tests/"
104+
else
105+
echo "Error: Unknown matrix.component value: '${{matrix.component}}'" >&2
106+
exit 1
107+
fi
108+
109+
uv run -- mypy $ARGS
85110
86111
pre-commit: # yamllint disable-line rule:key-ordering
87112
env:
@@ -128,7 +153,7 @@ jobs:
128153

129154
- name: Save pre-commit Checks Which Require Skipping
130155
run: |
131-
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref_name }}" == "${{ github.event.repository.default_branch }}" ]]; then
156+
if [[ "${{github.event_name}}" == "push" && "${{github.ref_name}}" == "${{github.event.repository.default_branch}}" ]]; then
132157
echo "SKIP=check-github-workflows,ruff-check,uv-lock,gitlint-ci" >> $GITHUB_ENV
133158
else
134159
echo "SKIP=check-github-workflows,ruff,uv-lock" >> $GITHUB_ENV
@@ -205,13 +230,13 @@ jobs:
205230
- name: Run pytest
206231
run: uv run pytest --cov --cov-branch --cov-report=xml --junitxml=junit.xml
207232

208-
- if: ${{ !cancelled() }}
233+
- if: ${{!cancelled()}}
209234
name: Upload test results to Codecov
210235
uses: codecov/test-results-action@v1
211236
with:
212237
use_oidc: true
213238

214-
- if: ${{ !cancelled() }}
239+
- if: ${{!cancelled()}}
215240
name: Upload coverage report to Codecov
216241
uses: codecov/codecov-action@v5
217242
with:
@@ -318,6 +343,6 @@ jobs:
318343
steps:
319344
- name: Create GitHub Release
320345
env: # yamllint disable-line rule:key-ordering
321-
GITHUB_TOKEN: ${{ github.token }}
322-
run: gh release create '${{ github.ref_name }}' --repo '${{github.repository}}' --verify-tag
346+
GITHUB_TOKEN: ${{github.token}}
347+
run: gh release create '${{github.ref_name}}' --repo '${{github.repository}}' --verify-tag
323348
--generate-notes

.github/workflows/pr-auto-updater.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
name: Generate Access Token
1616
uses: actions/create-github-app-token@v2
1717
with:
18-
app-id: ${{ vars.PR_AUTO_UPDATE_CLIENT_ID }}
19-
private-key: ${{ secrets.PR_AUTO_UPDATE_PRIVATE_KEY }}
18+
app-id: ${{vars.PR_AUTO_UPDATE_CLIENT_ID}}
19+
private-key: ${{secrets.PR_AUTO_UPDATE_PRIVATE_KEY}}
2020

2121
- uses: CSSUoB/[email protected]
2222
env: # yamllint disable-line rule:key-ordering
23-
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
23+
GITHUB_TOKEN: ${{steps.generate-token.outputs.token}}
2424
MERGE_CONFLICT_ACTION: label
2525
MERGE_CONFLICT_LABEL: conflict
2626
PR_FILTER: labelled

.github/workflows/prevent-migrations-deletion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
uses: xalvarez/[email protected]
1616
with:
1717
allowNewFiles: true
18-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
githubToken: ${{secrets.GITHUB_TOKEN}}
1919
pattern: .*\/db\/.+\/migrations\/\d{4}\w*\.py$

0 commit comments

Comments
 (0)