Merge pull request #314 from neutrinoceros/dependabot/pip/requirement… #1710
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths-ignore: | |
- README.md | |
schedule: | |
# run this every Wednesday at 3 am UTC | |
- cron: 0 3 * * 3 | |
workflow_dispatch: | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
python-version: | |
- '3.9' | |
- '3.12' | |
install-target: | |
- . | |
- .[HDF5] | |
include: | |
- os: ubuntu-20.04 | |
python-version: '3.9' | |
install-target: .[HDF5] | |
deps: minimal | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: python -m pip install --upgrade pip | |
- if: matrix.deps == 'minimal' | |
run: | | |
pipx run uv pip compile pyproject.toml --resolution=lowest-direct > mindeps.txt | |
python -m pip install --requirement mindeps.txt | |
- name: Build | |
env: | |
INSTALL_TARGET: ${{ matrix.install-target }} | |
run: | | |
python -m pip install "$INSTALL_TARGET" | |
python -m pip install --requirement requirements/tests.txt | |
- run: python -m pip list | |
- name: run tests | |
run: pytest --color=yes | |
type-check: | |
runs-on: ubuntu-latest | |
name: type check | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
# Match minimal supported Python version | |
# to make sure we're not using unparseable syntax | |
python-version: '3.9' | |
- name: Build | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install . | |
python -m pip install --requirement requirements/typecheck.txt | |
- name: Run mypy | |
run: mypy src/yt_idefix |