Skip to content

Github worfklow for tests #2

Github worfklow for tests

Github worfklow for tests #2

Workflow file for this run

name: tests
on:
push:
branches: [main]
pull_request:
branches:
- main
workflow_dispatch:
jobs:
code-quality:
name: Code Quality
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
requirements_dev.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Lint package
run: |
make lint
tests:
name: Test suite (${{ matrix.os }}, Python ${{ matrix.python-version }})
needs: code-quality
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.10, 3.11]
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
requirements_dev.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Run tests
run: |
make tests
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true
if: ${{ matrix.os == 'ubuntu-latest' }}