Skip to content

Commit 845366a

Browse files
committed
ci: Update some min dev deps, separate out min dep check CI job
1 parent b9e8851 commit 845366a

File tree

4 files changed

+143
-408
lines changed

4 files changed

+143
-408
lines changed

.github/workflows/checks.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@ jobs:
3737
run: pip install pdm
3838

3939
- name: Install Dependencies
40-
if: matrix.python != '3.9'
4140
run: pdm install
4241

43-
- name: Install minimum dependencies
44-
if: matrix.python == '3.9'
45-
run: pdm install -L pdm.minimal.lock
46-
4742
- name: Check formatting
4843
run: pdm run ruff format . --check
4944

@@ -56,15 +51,11 @@ jobs:
5651
- name: Run pytest without coverage
5752
if: matrix.os != 'ubuntu-latest'
5853
run: pdm test
59-
env:
60-
TASKIPY: true
6154

6255
- name: Run pytest with coverage
6356
if: matrix.os == 'ubuntu-latest'
6457
run: pdm test_with_coverage
65-
env:
66-
TASKIPY: true
67-
58+
6859
- run: mv .coverage .coverage.${{ matrix.python }}
6960
if: matrix.os == 'ubuntu-latest'
7061

@@ -77,6 +68,45 @@ jobs:
7768
if-no-files-found: error
7869
include-hidden-files: true
7970

71+
test_min_deps:
72+
strategy:
73+
matrix:
74+
os: [ ubuntu-latest, macos-latest, windows-latest ]
75+
runs-on: ${{ matrix.os }}
76+
steps:
77+
- uses: actions/checkout@v4.2.2
78+
- name: Set up Python
79+
uses: actions/setup-python@v5.3.0
80+
with:
81+
python-version: "3.9"
82+
83+
- name: Get Python Version
84+
id: get_python_version
85+
run: echo "python_version=$(python --version)" >> $GITHUB_OUTPUT
86+
shell: bash
87+
88+
- name: Cache dependencies
89+
uses: actions/cache@v4
90+
with:
91+
path: .venv
92+
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-min-dependencies-${{ hashFiles('**/pdm.lock') }}
93+
restore-keys: |
94+
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-min-dependencies
95+
- name: Install PDM
96+
run: pip install pdm
97+
98+
- name: Install minimum dependencies
99+
run: pdm install -L pdm.minimal.lock
100+
101+
- name: Run mypy
102+
run: pdm mypy --show-error-codes
103+
104+
- name: Lint
105+
run: pdm run ruff check .
106+
107+
- name: Run unit tests only # snapshots are expected to fail
108+
run: pdm unit_test
109+
80110
coverage:
81111
name: Combine & check coverage
82112
needs: test

pdm.lock

Lines changed: 31 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)