2021-04-30 19:47:21 +00:00
|
|
|
name: Tests (tox)
|
|
|
|
|
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
|
|
|
|
|
|
|
steps:
|
2021-05-12 11:43:36 +00:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2021-04-30 19:47:21 +00:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2021-05-12 11:29:28 +00:00
|
|
|
uses: actions/setup-python@v2.2.2
|
2021-04-30 19:47:21 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
pip install tox tox-gh-actions
|
|
|
|
|
|
|
|
- name: Test with tox
|
|
|
|
run: tox
|
2021-05-01 11:30:33 +00:00
|
|
|
if: ${{ matrix.python-version != '3.9' }}
|
|
|
|
|
|
|
|
- name: Test with tox (and upload coverage)
|
|
|
|
uses: paambaati/codeclimate-action@v2.7.5
|
|
|
|
if: ${{ matrix.python-version == '3.9' }}
|
|
|
|
env:
|
2021-05-12 10:54:45 +00:00
|
|
|
CC_TEST_REPORTER_ID: 2a411f596959fc32f5d73f3ba7cef8cc4d5733299d742dbfc97fd6c190b9010c
|
2021-05-01 11:30:33 +00:00
|
|
|
with:
|
|
|
|
coverageCommand: tox
|
|
|
|
coverageLocations: |
|
|
|
|
${{ github.workspace }}/.tox/reports/*/coverage.xml:coverage.py
|
|
|
|
prefix: ${{ github.workspace }}/.tox/py39/lib/python3.9/site-packages
|
2021-05-01 09:27:05 +00:00
|
|
|
|
2021-07-26 07:34:13 +00:00
|
|
|
- uses: codecov/codecov-action@v2.0.2
|
2021-05-01 09:27:05 +00:00
|
|
|
with:
|
|
|
|
directory: '.tox/reports'
|