04057d07 |
name: tests
on: [push]
jobs:
test:
|
dfd2e25b |
runs-on: ${{ matrix.os }}
|
04057d07 |
strategy:
max-parallel: 4
matrix:
|
dfd2e25b |
os: [ubuntu-latest, macos-latest, windows-latest]
|
04057d07 |
python-version: [3.6, 3.7]
steps:
- uses: actions/checkout@v1
- shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- shell: bash
run: echo "##[set-output name=py_version;]$(py_ver=${{ matrix.python-version }} && echo ${py_ver//./})"
id: extract_py_version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test
run: tox
- name: Upload coverage
|
dfd2e25b |
if: matrix.os == 'ubuntu-latest'
|
04057d07 |
uses: codecov/codecov-action@v1.0.3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./.coverage.xml
flags: ${{ steps.extract_branch.outputs.branch }},py${{ steps.extract_py_version.outputs.py_version }}
|