Release v0.2.1 #143
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 tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
PYTEST_ADDOPTS: "--color=yes" | |
# Cancel running workflows when additional changes are pushed | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Test the `optimake` package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: | | |
pyproject.toml | |
- name: Install latest compatible versions of immediate dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U setuptools wheel | |
pip install -e .[tests,dev] | |
- name: Run linters | |
run: | | |
pre-commit run --all-files | |
- name: Run tests | |
run: pytest -vv --cov-report=xml --cov-report=term ./tests | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
name: project | |
file: ./coverage.xml | |
flags: project |