Skip to content

Commit

Permalink
Add .github/workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Dec 12, 2020
1 parent e8adc65 commit 3f9fa2e
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9.0, 3.10.0-alpha.3, pypy3]
os: [ubuntu-18.04, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade "pip>=20.1"
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade tox
- name: Run tox
run: |
tox -e cov
env:
PYTEST_DISCORD_WEBHOOK: ${{ secrets.PYTEST_DISCORD_WEBHOOK }}

- name: Coverage report
run: |
python -m pip install --upgrade codecov coveralls
codecov
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: matrix.os == 'ubuntu-18.04' && matrix.python-version == '3.8'

0 comments on commit 3f9fa2e

Please sign in to comment.