Skip to content

ci: Test minimum dependencies in CI #1182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ jobs:
- name: Run pytest without coverage
if: matrix.os != 'ubuntu-latest'
run: pdm test
env:
TASKIPY: true

- name: Run pytest with coverage
if: matrix.os == 'ubuntu-latest'
run: pdm test_with_coverage
env:
TASKIPY: true


- run: mv .coverage .coverage.${{ matrix.python }}
if: matrix.os == 'ubuntu-latest'

Expand All @@ -72,6 +68,45 @@ jobs:
if-no-files-found: error
include-hidden-files: true

test_min_deps:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.3.0
with:
python-version: "3.9"

- name: Get Python Version
id: get_python_version
run: echo "python_version=$(python --version)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache dependencies
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-min-dependencies-${{ hashFiles('**/pdm.lock') }}
restore-keys: |
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-min-dependencies
- name: Install PDM
run: pip install pdm

- name: Install minimum dependencies
run: pdm install -L pdm.minimal.lock

- name: Run mypy
run: pdm mypy --show-error-codes

- name: Lint
run: pdm run ruff check .

- name: Run unit tests only # snapshots are expected to fail
run: pdm unit_test

coverage:
name: Combine & check coverage
needs: test
Expand Down
112 changes: 31 additions & 81 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading