mirror of
https://github.com/jazzband/contextlib2.git
synced 2026-03-17 06:00:23 +00:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Test
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 'pypy2', 'pypy3']
|
|
|
|
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: |
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
- name: Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
key:
|
|
test-${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
|
|
restore-keys: |
|
|
test-${{ matrix.python-version }}-v1-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade tox tox-gh-actions
|
|
|
|
- name: Tox tests
|
|
shell: bash
|
|
run: |
|
|
tox
|
|
env:
|
|
TARGET: ${{ matrix.target }}
|
|
|
|
- name: Upload coverage to Coveralls
|
|
uses: coverallsapp/github-action@master
|
|
with:
|
|
github-token: ${{ secrets.COVERALLS_GITHUB_TOKEN }}
|