2020-02-25 17:27:25 +01:00
|
|
|
name: Test
|
2020-02-27 19:11:28 +01:00
|
|
|
on: [push, pull_request]
|
2020-02-25 17:27:25 +01:00
|
|
|
|
|
|
|
jobs:
|
2020-02-25 22:08:48 +01:00
|
|
|
test:
|
2020-02-25 17:27:25 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2022-02-07 14:20:50 +01:00
|
|
|
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', pypy-3.7, pypy-3.8]
|
2022-02-01 19:07:54 +01:00
|
|
|
exclude:
|
|
|
|
- os: windows-latest
|
|
|
|
python-version: pypy-3.7
|
|
|
|
- os: windows-latest
|
|
|
|
python-version: pypy-3.8
|
2022-02-01 15:47:17 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-02-25 17:27:25 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-07-23 19:11:34 +02:00
|
|
|
- uses: actions/setup-python@v2
|
2020-02-25 17:27:25 +01:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2022-07-03 10:14:38 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: python -m pip install tox
|
2020-02-25 17:27:25 +01:00
|
|
|
- name: Run tests
|
2022-07-03 10:14:38 +02:00
|
|
|
run: python -m tox
|
2020-02-25 22:08:48 +01:00
|
|
|
- name: Upload coverage to Coveralls
|
2020-05-19 04:32:52 +02:00
|
|
|
if: github.event_name == 'push'
|
2020-02-25 19:32:50 +01:00
|
|
|
env:
|
|
|
|
COVERALLS_PARALLEL: true
|
2020-07-23 19:12:20 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-02-25 19:32:50 +01:00
|
|
|
run: |
|
|
|
|
python -m pip install coveralls
|
2021-03-23 00:26:27 +01:00
|
|
|
python -m coveralls --service=github
|
2020-02-25 22:08:48 +01:00
|
|
|
|
2020-03-01 00:25:41 +01:00
|
|
|
coveralls-finish:
|
2020-02-25 22:08:48 +01:00
|
|
|
needs: test
|
2020-05-19 04:32:52 +02:00
|
|
|
if: github.event_name == 'push'
|
2020-02-25 22:08:48 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-23 19:11:34 +02:00
|
|
|
- uses: actions/setup-python@v2
|
2020-02-29 20:33:44 +01:00
|
|
|
with:
|
|
|
|
python-version: 3.x
|
2020-07-23 19:12:20 +02:00
|
|
|
- name: Finish Coveralls parallel builds
|
2020-02-25 22:08:48 +01:00
|
|
|
env:
|
2020-07-23 19:12:20 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-02-25 22:08:48 +01:00
|
|
|
run: |
|
2020-07-23 19:12:20 +02:00
|
|
|
python -m pip install coveralls
|
2021-03-23 00:26:27 +01:00
|
|
|
python -m coveralls --service=github --finish
|