[pre-commit.ci] pre-commit autoupdate #185
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: check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Python dependencies | |
run: pip install mypy ruff | |
- name: ruff | |
run: ruff check | |
- name: ruff format | |
run: ruff format --check | |
- name: mypy | |
run: mypy . --ignore-missing-imports | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install apt packages | |
run: sudo apt-get install -y libcgal-dev | |
- name: Install package | |
run: | | |
pip install ninja gcovr pytest-cov | |
python -c 'import subprocess; import tomllib; subprocess.run(["pip", "install", *tomllib.load(open("pyproject.toml", "rb"))["build-system"]["requires"]], check=True)' | |
pip install --no-build-isolation -Csetup-args=-Dbuildtype=debug -Csetup-args=-Db_coverage=true -ve .[test] | |
- name: Run tests | |
run: pytest --benchmark-disable --cov test | |
- name: Analyze C coverage | |
run: gcovr --cobertura cobertura.xml | |
- name: Upload to Codecov.io | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./.coverage,./cobertura.xml | |
token: ${{ secrets.CODECOV_TOKEN }} |