| 1 |
name: Test |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
test: |
| 7 |
runs-on: ubuntu-latest |
| 8 |
strategy: |
| 9 |
fail-fast: false |
| 10 |
max-parallel: 5 |
| 11 |
matrix: |
| 12 |
python-version: |
| 13 |
- '3.10' |
| 14 |
- '3.11' |
| 15 |
- '3.12' |
| 16 |
- '3.13' |
| 17 |
- '3.14' |
| 18 |
|
| 19 |
steps: |
| 20 |
- uses: actions/checkout@v4 |
| 21 |
|
| 22 |
- name: Set up Python ${{ matrix.python-version }} |
| 23 |
uses: actions/setup-python@v5 |
| 24 |
with: |
| 25 |
python-version: ${{ matrix.python-version }} |
| 26 |
|
| 27 |
- name: Get pip cache dir |
| 28 |
id: pip-cache |
| 29 |
run: | |
| 30 |
echo "::set-output name=dir::$(pip cache dir)" |
| 31 |
|
| 32 |
- name: Cache |
| 33 |
uses: actions/cache@v4 |
| 34 |
with: |
| 35 |
path: ${{ steps.pip-cache.outputs.dir }} |
| 36 |
key: |
| 37 |
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }} |
| 38 |
restore-keys: | |
| 39 |
${{ matrix.python-version }}-v1- |
| 40 |
|
| 41 |
- name: Install dependencies |
| 42 |
run: | |
| 43 |
python -m pip install --upgrade pip |
| 44 |
python -m pip install --upgrade tox tox-gh-actions |
| 45 |
|
| 46 |
- name: Tox tests |
| 47 |
run: | |
| 48 |
tox -v |
| 49 |
|
| 50 |
- name: Coveralls |
| 51 |
uses: AndreMiras/coveralls-python-action@develop |
| 52 |
with: |
| 53 |
parallel: true |
| 54 |
flag-name: Unit Test |
| 55 |
|
| 56 |
coveralls_finish: |
| 57 |
needs: test |
| 58 |
runs-on: ubuntu-latest |
| 59 |
steps: |
| 60 |
- name: Coveralls Finished |
| 61 |
uses: AndreMiras/coveralls-python-action@develop |
| 62 |
with: |
| 63 |
parallel-finished: true |