From 9261bec264fa589ac004934ab8d9340a7d7c85c1 Mon Sep 17 00:00:00 2001 From: PerchunPak <68118654+PerchunPak@users.noreply.github.com> Date: Tue, 12 Oct 2021 19:20:03 +0300 Subject: [PATCH] Minimize copy-pase in Github Actions file --- .github/workflows/main.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9b32d7..55a4faf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,34 +2,17 @@ name: main on: push: - branches: [main] - tags: + branches: main pull_request: jobs: main: strategy: 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: - # 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 - os: windows-latest python: 3.6 @@ -50,5 +33,7 @@ jobs: - uses: actions/setup-python@v2 with: 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 }}