Minimize copy-pase in Github Actions file

This commit is contained in:
PerchunPak 2021-10-12 19:20:03 +03:00 committed by GitHub
parent ecee230c6f
commit 9261bec264
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,34 +2,17 @@ name: main
on: on:
push: push:
branches: [main] branches: main
tags:
pull_request: pull_request:
jobs: jobs:
main: main:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest]
python: [pypy-3.7, 3.6, 3.7, 3.8, 3.9, '3.10.0-alpha - 3.10.999']
toxenv: [py]
include: include:
# linux
- os: ubuntu-latest
python: pypy-3.7
toxenv: py
- os: ubuntu-latest
python: 3.6
toxenv: py
- os: ubuntu-latest
python: 3.7
toxenv: py
- os: ubuntu-latest
python: 3.8
toxenv: py
- os: ubuntu-latest
python: 3.9
toxenv: py
- os: ubuntu-latest
python: '3.10.0-alpha - 3.10.999'
toxenv: py
# windows # windows
- os: windows-latest - os: windows-latest
python: 3.6 python: 3.6
@ -50,5 +33,7 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
- run: python -mpip install --upgrade setuptools pip tox virtualenv - run: |
pip install --upgrade pip
pip install --upgrade setuptools pip tox virtualenv
- run: tox -e ${{ matrix.toxenv }} - run: tox -e ${{ matrix.toxenv }}