2021-04-16 15:27:31 +08:00
|
|
|
name: Main testing workflow
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-11-05 16:56:15 +08:00
|
|
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
2021-04-16 15:27:31 +08:00
|
|
|
|
|
|
|
steps:
|
2022-11-05 17:24:30 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-16 15:27:31 +08:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2022-11-05 17:24:30 +08:00
|
|
|
uses: actions/setup-python@v4
|
2021-04-16 15:27:31 +08:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -U setuptools
|
2022-11-05 19:35:13 +08:00
|
|
|
pip install tox tox-gh-actions coverage[toml]
|
2022-02-24 23:52:23 +08:00
|
|
|
- name: Type checking
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
tox -e mypy
|
2021-04-16 15:27:31 +08:00
|
|
|
- name: Test with tox
|
2022-11-05 17:42:30 +08:00
|
|
|
run: |
|
|
|
|
tox
|
|
|
|
coverage xml
|
2022-11-05 17:21:20 +08:00
|
|
|
- uses: codecov/codecov-action@v3
|
|
|
|
with:
|
|
|
|
fail_ci_if_error: true
|
|
|
|
verbose: true # optional (default = false)
|