Skip to content
Myr

tests.yaml

This file

Path

.github/workflows/tests.yaml

52 lines · 1.7 KiB · YAML

Last changed by

Merge pull request #1561 from pallets/github-actionsDavid Lordbefore adoption499140d

History of this file

Take it

Merge pull request #1561 from pallets/github-actionsDavid Lordbefore adoption499140d

lines 1–52why, one step back
1name: Tests
2on:3 push:4 branches:5 - master6 - '*.x'7 pull_request:8 branches:9 - master10 - '*.x'11jobs:12 tests:13 name: ${{ matrix.name }}14 runs-on: ${{ matrix.os }}15 strategy:16 fail-fast: false17 matrix:18 include:19 - {name: Linux, python: '3.8', os: ubuntu-latest, tox: py38}20 - {name: Windows, python: '3.8', os: windows-latest, tox: py38}21 - {name: Mac, python: '3.8', os: macos-latest, tox: py38}22 - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}23 - {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}24 - {name: 'PyPy', python: pypy3, os: ubuntu-latest, tox: pypy3}25 - {name: Style, python: '3.8', os: ubuntu-latest, tox: style}26 - {name: Docs, python: '3.8', os: ubuntu-latest, tox: docs}27 steps:28 - uses: actions/checkout@v229 - uses: actions/setup-python@v230 with:31 python-version: ${{ matrix.python }}32 - name: update pip33 run: |34 pip install -U wheel35 pip install -U setuptools36 python -m pip install -U pip37 - name: get pip cache dir38 id: pip-cache39 run: echo "::set-output name=dir::$(pip cache dir)"40 - name: cache pip41 uses: actions/cache@v142 with:43 path: ${{ steps.pip-cache.outputs.dir }}44 key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}45 - name: cache pre-commit46 uses: actions/cache@v147 with:48 path: ~/.cache/pre-commit49 key: pre-commit|${{ matrix.python }}|${{ hashFiles('.pre-commit-config.yaml') }}50 if: matrix.tox == 'style'51 - run: pip install tox52 - run: tox -e ${{ matrix.tox }}