Skip to content

Commit 2071f32

Browse files
committed
update cdk
1 parent a65faca commit 2071f32

2 files changed

Lines changed: 54 additions & 8 deletions

File tree

.github/workflows/check.yml

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,59 @@
1-
on: [ workflow_dispatch, push ]
1+
on: [ push, pull_request ]
2+
3+
env:
4+
python-version: 3.13
5+
26
jobs:
3-
check:
7+
setup:
48
runs-on: ubuntu-latest
9+
outputs:
10+
cache-key: ${{ steps.cache-key.outputs.value }}
511
steps:
6-
- uses: actions/checkout@v2
7-
- uses: actions/setup-python@v2
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
814
with:
9-
python-version: '3.13'
15+
python-version: ${{ env.python-version }}
16+
- id: cache-key
17+
run: |
18+
HASH=$(sha256sum poetry.lock | cut -d ' ' -f1)
19+
echo "value=venv-${{ runner.os }}-python-${{ env.python-version }}-$HASH" >> $GITHUB_OUTPUT
1020
- uses: snok/install-poetry@v1
21+
with:
22+
virtualenvs-create: true
23+
virtualenvs-in-project: true
1124
- run: make install
12-
- run: make lint
13-
- run: make types
14-
- run: make test
25+
- uses: actions/cache@v4
26+
with:
27+
path: .venv
28+
key: ${{ steps.cache-key.outputs.value }}
29+
30+
check:
31+
needs: setup
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
task: [ lint, types, test ]
36+
fail-fast: false
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: actions/setup-python@v5
40+
with:
41+
python-version: ${{ env.python-version }}
42+
- uses: actions/cache@v4
43+
with:
44+
path: .venv
45+
key: ${{ needs.setup.outputs.cache-key }}
46+
fail-on-cache-miss: true
47+
- uses: snok/install-poetry@v1
48+
with:
49+
virtualenvs-create: true
50+
virtualenvs-in-project: true
51+
52+
- if: matrix.task == 'types'
53+
uses: actions/cache@v4
54+
with:
55+
path: .mypy_cache
56+
key: mypy-${{ runner.os }}-${{ env.python-version }}-${{ hashFiles('**/*.py') }}
57+
restore-keys: mypy-${{ runner.os }}-${{ env.python-version }}-
58+
59+
- run: make ${{ matrix.task }}

mypy.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[mypy]
22
check_untyped_defs = True
33
disallow_untyped_defs = False
4+
ignore_missing_imports = True
45

56
[mypy-src.*]
67
disallow_untyped_defs = True

0 commit comments

Comments
 (0)