Dump consts after structs (#47) #28
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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/poetry.lock') }} | |
- name: Cache pre-commit dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}-${{ hashFiles('**/tox.ini') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: Basic Test Suit | |
run: | | |
tox -e py | |
- name: Generate coverage report | |
run: | | |
tox -e coverage -- --fail-under=99 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./test-reports/coverage.xml | |
flags: unittests | |
fail_ci_if_error: true |