From f0a9947397d85f86abf53ca136df052853bdfd87 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 14:35:58 +0100 Subject: [PATCH 01/23] test tox with py39 on Github Actions CI --- .github/workflows/tox.yml | 28 ++++++++++++++++++++++++++++ tox.ini | 15 ++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tox.yml diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml new file mode 100644 index 000000000..5affa498e --- /dev/null +++ b/.github/workflows/tox.yml @@ -0,0 +1,28 @@ +name: Python package + +on: + - push + - pull_request + +jobs: + build: + runs-on: ${{ matrix.platform }} + strategy: + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Test with tox + run: tox + env: + PLATFORM: ${{ matrix.platform }} diff --git a/tox.ini b/tox.ini index aea858d25..4e7b8ddbf 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,20 @@ [tox] isolated_build = True -envlist = clean,py{36,37,38}-{mindeps,alldeps},report,pre-commit +envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report,pre-commit + +[gh-actions] +python = + 3.6: py36-mindeps, py36-alldeps + 3.7: py37-mindeps, py37-alldeps, report + 3.8: py38-mindeps, py38-alldeps + 3.9: py39-mindeps, py39-alldeps + +[gh-actions:env] +PLATFORM = + ubuntu-latest: linux + macos-latest: macos + windows-latest: windows [pytest] testpaths = adaptive From a4c0c0f8c37e5107c960c404f2f4bfe11b570881 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 16:02:24 +0100 Subject: [PATCH 02/23] verbose --- .github/workflows/tox.yml | 2 +- tox.ini | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 5affa498e..d75e025ee 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -23,6 +23,6 @@ jobs: python -m pip install --upgrade pip pip install tox tox-gh-actions - name: Test with tox - run: tox + run: tox -vv env: PLATFORM: ${{ matrix.platform }} diff --git a/tox.ini b/tox.ini index 4e7b8ddbf..feade812f 100644 --- a/tox.ini +++ b/tox.ini @@ -5,10 +5,10 @@ envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report,pre-commit [gh-actions] python = - 3.6: py36-mindeps, py36-alldeps - 3.7: py37-mindeps, py37-alldeps, report - 3.8: py38-mindeps, py38-alldeps - 3.9: py39-mindeps, py39-alldeps + 3.6: py36-{mindeps,alldeps} + 3.7: py37-{mindeps,alldeps}, report + 3.8: py38-{mindeps,alldeps} + 3.9: py39-{mindeps,alldeps} [gh-actions:env] PLATFORM = From 846c17138436ea5c449a12615e1125363bd21bb2 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 16:13:14 +0100 Subject: [PATCH 03/23] test --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index feade812f..0295f5cc6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] isolated_build = True -envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report,pre-commit +envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report,pre-commit,linux [gh-actions] python = From f288f4d5850c556a9e4239e07b0ee52b48d33b48 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 16:20:05 +0100 Subject: [PATCH 04/23] fix env --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 0295f5cc6..1d69c03b4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] isolated_build = True -envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report,pre-commit,linux +envlist = clean,py{36,37,38,39}-{mindeps,alldeps}-{linux,windows,macos},report,pre-commit,linux [gh-actions] python = From a6135c3aa8188f005eea7d110711c53a4039f1b6 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:07:33 +0100 Subject: [PATCH 05/23] disable fail-fast --- .github/workflows/tox.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index d75e025ee..ce4a106b0 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -8,6 +8,7 @@ jobs: build: runs-on: ${{ matrix.platform }} strategy: + fail-fast: false matrix: platform: [ubuntu-latest, macos-latest, windows-latest] python-version: [3.6, 3.7, 3.8, 3.9] From 8aecb56f2f49c733a29a3df6e4a8d0a3576eafcd Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:12:27 +0100 Subject: [PATCH 06/23] add pre-commit Github Action --- .github/workflows/pre-commit.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..723347913 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [master] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.0 From c368f3fb8c3a52553fda88fe7585978798786aae Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:29:29 +0100 Subject: [PATCH 07/23] cleanup azure tests --- .github/workflows/tox.yml | 4 +-- azure-pipelines.yml | 71 --------------------------------------- tox.ini | 7 +--- 3 files changed, 3 insertions(+), 79 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index ce4a106b0..3f973b0d5 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -1,11 +1,11 @@ -name: Python package +name: tox on: - push - pull_request jobs: - build: + test: runs-on: ${{ matrix.platform }} strategy: fail-fast: false diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5992b8e11..50cfa33a8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,77 +6,6 @@ pr: - "*" jobs: -- job: pytest - strategy: - # use cross-product when https://github.com/microsoft/azure-pipelines-yaml/issues/20 is solved - matrix: - UbuntuPy36: - python.version: '3.6' - vmImage: 'ubuntu-latest' - tox_env: 'py36' - UbuntuPy37: - python.version: '3.7' - vmImage: 'ubuntu-latest' - tox_env: 'py37' - UbuntuPy38: - python.version: '3.8' - vmImage: 'ubuntu-latest' - tox_env: 'py38' - - macOSPy36: - python.version: '3.6' - vmImage: 'macOS-latest' - tox_env: 'py36' - macOSPy37: - python.version: '3.7' - vmImage: 'macOS-latest' - tox_env: 'py37' - macOSPy38: - python.version: '3.8' - vmImage: 'macOS-latest' - tox_env: 'py38' - - WindowsServerPy36: - python.version: '3.6' - vmImage: 'vs2017-win2016' - tox_env: 'py36' - WindowsServerPy37: - python.version: '3.7' - vmImage: 'vs2017-win2016' - tox_env: 'py37' - WindowsServerPy38: - python.version: '3.8' - vmImage: 'vs2017-win2016' - tox_env: 'py38' - - WindowsPy36: - python.version: '3.6' - vmImage: 'windows-latest' - tox_env: 'py36' - WindowsPy37: - python.version: '3.7' - vmImage: 'windows-latest' - tox_env: 'py37' - WindowsPy38: - python.version: '3.8' - vmImage: 'windows-latest' - tox_env: 'py38' - - pool: - vmImage: '$(vmImage)' - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - - script: pip install tox - displayName: Install tox - - script: tox -e $(tox_env)-mindeps - displayName: Run the tests with minimal dependencies - - script: tox -e clean - displayName: Clean - - script: tox -e $(tox_env)-alldeps - displayName: Run the tests - - job: coverage steps: - task: UsePythonVersion@0 diff --git a/tox.ini b/tox.ini index 1d69c03b4..6019b793a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] isolated_build = True -envlist = clean,py{36,37,38,39}-{mindeps,alldeps}-{linux,windows,macos},report,pre-commit,linux +envlist = clean,py{36,37,38,39}-{mindeps,alldeps}-{linux,windows,macos},report [gh-actions] python = @@ -60,11 +60,6 @@ deps = coverage skip_install = true commands = coverage erase -[testenv:pre-commit] -skip_install = true -deps = pre-commit -commands = pre-commit run --all-files --show-diff-on-failure - [flake8] max-line-length = 100 ignore = E501, W503, E203, E266, E741 From 754e3f195911084df99e1e55bd32f54b8299e057 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:32:46 +0100 Subject: [PATCH 08/23] run 'pre-commit autoupdate' --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b5a7686e6..d59dddd43 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.3.0 + rev: v3.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -13,12 +13,12 @@ repos: hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v2.7.3 + rev: v2.10.0 hooks: - id: pyupgrade args: ['--py36-plus'] - repo: https://github.com/timothycrosley/isort - rev: 5.6.4 + rev: 5.7.0 hooks: - id: isort - repo: https://gitlab.com/pycqa/flake8 From e29ee24dfbbce88eda9592a4b582dc69bc833d4c Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:36:31 +0100 Subject: [PATCH 09/23] upload test coverage with Github Actions --- .github/workflows/coverage.yml | 22 ++++++++++++++++++++++ azure-pipelines.yml | 14 -------------- 2 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..537e6097a --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,22 @@ +name: Test coverage + +on: + - push + - pull_request + +jobs: + coverage: + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions codecov + - name: Test with tox + run: tox -e py37-alldeps-linux,report + - name: Upload test coverage + run: codecov -t ${{ secrets.CODECOV_TOKEN }} -f .coverage.xml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 50cfa33a8..841c4781f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,20 +6,6 @@ pr: - "*" jobs: -- job: coverage - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - - script: pip install tox - displayName: Install tox - - script: tox -e py37-alldeps,report - displayName: Run the tests and generate coverage - - script: | - pip install codecov - codecov -t $(CODECOV_TOKEN) -f .coverage.xml - displayName: Test upload coverage - - job: pre_commit steps: - task: UsePythonVersion@0 From 0932049ff2b8166d480b4cbfea04b48998e45edf Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:38:00 +0100 Subject: [PATCH 10/23] remove pre-commit from azure-pipelines.yml --- azure-pipelines.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 841c4781f..062a7b511 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,16 +6,6 @@ pr: - "*" jobs: -- job: pre_commit - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - - script: pip install tox - displayName: Install tox - - script: tox -e pre-commit - displayName: Lining tests - - job: authors_check steps: - script: | From 9c643b23b09990284cc1d8291d5aa3543b1f6e38 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:41:01 +0100 Subject: [PATCH 11/23] fix test coverage CI --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 537e6097a..2d89f6a99 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,10 +2,10 @@ name: Test coverage on: - push - - pull_request jobs: coverage: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} From 4e53eee4b6b16eb0480fbd22e80131dba47e23a7 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:45:32 +0100 Subject: [PATCH 12/23] remove report from envlsit --- .github/workflows/coverage.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 2d89f6a99..320e99708 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,4 +1,4 @@ -name: Test coverage +name: coverage on: - push diff --git a/tox.ini b/tox.ini index 6019b793a..3f7cd04bb 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ envlist = clean,py{36,37,38,39}-{mindeps,alldeps}-{linux,windows,macos},report [gh-actions] python = 3.6: py36-{mindeps,alldeps} - 3.7: py37-{mindeps,alldeps}, report + 3.7: py37-{mindeps,alldeps} 3.8: py38-{mindeps,alldeps} 3.9: py39-{mindeps,alldeps} From 1abc02c7a2728eaa09e5efd45130e27c520ef9e9 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:49:43 +0100 Subject: [PATCH 13/23] reduce number of tests --- .github/workflows/tox.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 3f973b0d5..a3bff4ddb 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -1,8 +1,9 @@ name: tox on: - - push - - pull_request + pull_request: + push: + branches: [master] jobs: test: From 1e4be8f7b39938a14d68442ae93724b45435f223 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 17:57:19 +0100 Subject: [PATCH 14/23] add problemMatcher --- .github/workflows/matchers/pytest.json | 18 ++++++++++++++++++ .github/workflows/tox.yml | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/matchers/pytest.json diff --git a/.github/workflows/matchers/pytest.json b/.github/workflows/matchers/pytest.json new file mode 100644 index 000000000..3e5d8d5b8 --- /dev/null +++ b/.github/workflows/matchers/pytest.json @@ -0,0 +1,18 @@ +{ + "problemMatcher": [ + { + "owner": "python", + "pattern": [ + { + "regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$", + "file": 1, + "line": 2 + }, + { + "regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$", + "message": 2 + } + ] + } + ] +} diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index a3bff4ddb..ed25cb4ec 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -20,10 +20,13 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Register Python problem matcher + run: | + echo "::add-matcher::.github/workflows/matchers/pytest.json" - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox tox-gh-actions + pip install tox tox-gh-actions pytest-github-actions-annotate-failures - name: Test with tox run: tox -vv env: From 1b86bce2e8a07cabe80981fdb6cf6a7ad433722b Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 18:01:09 +0100 Subject: [PATCH 15/23] don't install tox-gh-actions for coverage --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 320e99708..3f004b9a9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,7 +15,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox tox-gh-actions codecov + pip install tox codecov - name: Test with tox run: tox -e py37-alldeps-linux,report - name: Upload test coverage From 1a0f8244dffd0791eb4c0cdfc3e117a7896235c3 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 18:05:28 +0100 Subject: [PATCH 16/23] remove verbose --- .github/workflows/tox.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index ed25cb4ec..cf39560f3 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -28,6 +28,6 @@ jobs: python -m pip install --upgrade pip pip install tox tox-gh-actions pytest-github-actions-annotate-failures - name: Test with tox - run: tox -vv + run: tox env: PLATFORM: ${{ matrix.platform }} From 2472eaed7dd6ac9cb02417624ec61c8800198bc4 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 18:27:03 +0100 Subject: [PATCH 17/23] rename jobs --- .github/workflows/tox.yml | 13 ++++++++++++- tox.ini | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index cf39560f3..b3a480b64 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -27,7 +27,18 @@ jobs: run: | python -m pip install --upgrade pip pip install tox tox-gh-actions pytest-github-actions-annotate-failures - - name: Test with tox + - name: Test with tox using minimal dependencies run: tox env: PLATFORM: ${{ matrix.platform }} + WHICH: mindeps + - name: Clean + run: tox + env: + PLATFORM: ${{ matrix.platform }} + WHICH: clean + - name: Test with tox with all dependencies + run: tox + env: + PLATFORM: ${{ matrix.platform }} + WHICH: alldeps diff --git a/tox.ini b/tox.ini index 3f7cd04bb..72b7da1a6 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,10 @@ PLATFORM = ubuntu-latest: linux macos-latest: macos windows-latest: windows +WHICH = + mindeps: mindeps + alldeps: alldeps + clean: clean [pytest] testpaths = adaptive From 816151e8dd3e0a246b122c9cb74e73c161d27ff3 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 18:46:11 +0100 Subject: [PATCH 18/23] do not use tox-gh-actions --- .github/workflows/tox.yml | 21 ++++++++------------- tox.ini | 20 +------------------- 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index b3a480b64..b3bc27687 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -26,19 +26,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox tox-gh-actions pytest-github-actions-annotate-failures - - name: Test with tox using minimal dependencies - run: tox + pip install tox pytest-github-actions-annotate-failures + - name: Set Python version + run: echo "PY_VERSION=$(echo ${version//./})" >> $GITHUB_ENV env: - PLATFORM: ${{ matrix.platform }} - WHICH: mindeps + version: ${{ matrix.python-version }} + - name: Test with tox using minimal dependencies + run: tox -e py${{ env.PY_VERSION }}-mindeps - name: Clean - run: tox - env: - PLATFORM: ${{ matrix.platform }} - WHICH: clean + run: tox -e clean - name: Test with tox with all dependencies - run: tox - env: - PLATFORM: ${{ matrix.platform }} - WHICH: alldeps + run: tox -e py${{ env.PY_VERSION }}-alldeps diff --git a/tox.ini b/tox.ini index 72b7da1a6..f95361025 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,6 @@ - [tox] isolated_build = True -envlist = clean,py{36,37,38,39}-{mindeps,alldeps}-{linux,windows,macos},report - -[gh-actions] -python = - 3.6: py36-{mindeps,alldeps} - 3.7: py37-{mindeps,alldeps} - 3.8: py38-{mindeps,alldeps} - 3.9: py39-{mindeps,alldeps} - -[gh-actions:env] -PLATFORM = - ubuntu-latest: linux - macos-latest: macos - windows-latest: windows -WHICH = - mindeps: mindeps - alldeps: alldeps - clean: clean +envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report [pytest] testpaths = adaptive From 981bb25440327ae1c1e5603c1e860bb800cbddbe Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 18:50:59 +0100 Subject: [PATCH 19/23] reorder --- .github/workflows/tox.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index b3bc27687..f8b06a6be 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -20,20 +20,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Set Python version for tox + run: echo "PY_VERSION=$(echo py${version//./})" >> $GITHUB_ENV + env: + version: ${{ matrix.python-version }} - name: Register Python problem matcher - run: | - echo "::add-matcher::.github/workflows/matchers/pytest.json" + run: echo "::add-matcher::.github/workflows/matchers/pytest.json" - name: Install dependencies run: | python -m pip install --upgrade pip pip install tox pytest-github-actions-annotate-failures - - name: Set Python version - run: echo "PY_VERSION=$(echo ${version//./})" >> $GITHUB_ENV - env: - version: ${{ matrix.python-version }} - name: Test with tox using minimal dependencies - run: tox -e py${{ env.PY_VERSION }}-mindeps + run: tox -e ${{ env.PY_VERSION }}-mindeps - name: Clean run: tox -e clean - name: Test with tox with all dependencies - run: tox -e py${{ env.PY_VERSION }}-alldeps + run: tox -e ${{ env.PY_VERSION }}-alldeps From b8172c03d095a0f27280ad72138e7cd38671f1e0 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 18:53:05 +0100 Subject: [PATCH 20/23] fix coverage CI --- .github/workflows/coverage.yml | 6 ++---- .github/workflows/tox.yml | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3f004b9a9..96450a1a9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,10 +13,8 @@ jobs: with: python-version: 3.7 - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox codecov + run: pip install tox codecov - name: Test with tox - run: tox -e py37-alldeps-linux,report + run: tox -e py37-alldeps,report - name: Upload test coverage run: codecov -t ${{ secrets.CODECOV_TOKEN }} -f .coverage.xml diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index f8b06a6be..23e09ebf1 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -27,9 +27,7 @@ jobs: - name: Register Python problem matcher run: echo "::add-matcher::.github/workflows/matchers/pytest.json" - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox pytest-github-actions-annotate-failures + run: pip install tox pytest-github-actions-annotate-failures - name: Test with tox using minimal dependencies run: tox -e ${{ env.PY_VERSION }}-mindeps - name: Clean From 5cbaadd5c7413e512170834e2010a65386a0196d Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Fri, 5 Mar 2021 19:19:38 +0100 Subject: [PATCH 21/23] string manipulation didn't work on Windows --- .github/workflows/coverage.yml | 2 +- .github/workflows/tox.yml | 8 ++------ tox.ini | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 96450a1a9..8f8a9449a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,6 +15,6 @@ jobs: - name: Install dependencies run: pip install tox codecov - name: Test with tox - run: tox -e py37-alldeps,report + run: tox -e py3.7-alldeps,report - name: Upload test coverage run: codecov -t ${{ secrets.CODECOV_TOKEN }} -f .coverage.xml diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 23e09ebf1..f903c1be8 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -20,17 +20,13 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Set Python version for tox - run: echo "PY_VERSION=$(echo py${version//./})" >> $GITHUB_ENV - env: - version: ${{ matrix.python-version }} - name: Register Python problem matcher run: echo "::add-matcher::.github/workflows/matchers/pytest.json" - name: Install dependencies run: pip install tox pytest-github-actions-annotate-failures - name: Test with tox using minimal dependencies - run: tox -e ${{ env.PY_VERSION }}-mindeps + run: tox -e py${{ matrix.python-version }}-mindeps - name: Clean run: tox -e clean - name: Test with tox with all dependencies - run: tox -e ${{ env.PY_VERSION }}-alldeps + run: tox -e py${{ matrix.python-version }}-alldeps diff --git a/tox.ini b/tox.ini index f95361025..9e4dc0843 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = True -envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report +envlist = clean,py{3.6,3.7,3.8,3.9}-{mindeps,alldeps},report [pytest] testpaths = adaptive From 00c349518b304e1dc651a6f36e2f2e55ea397e76 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 7 Mar 2021 14:57:34 +0100 Subject: [PATCH 22/23] Revert "string manipulation didn't work on Windows" This reverts commit 5cbaadd5c7413e512170834e2010a65386a0196d. --- .github/workflows/coverage.yml | 2 +- .github/workflows/tox.yml | 8 ++++++-- tox.ini | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8f8a9449a..96450a1a9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,6 +15,6 @@ jobs: - name: Install dependencies run: pip install tox codecov - name: Test with tox - run: tox -e py3.7-alldeps,report + run: tox -e py37-alldeps,report - name: Upload test coverage run: codecov -t ${{ secrets.CODECOV_TOKEN }} -f .coverage.xml diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index f903c1be8..23e09ebf1 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -20,13 +20,17 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Set Python version for tox + run: echo "PY_VERSION=$(echo py${version//./})" >> $GITHUB_ENV + env: + version: ${{ matrix.python-version }} - name: Register Python problem matcher run: echo "::add-matcher::.github/workflows/matchers/pytest.json" - name: Install dependencies run: pip install tox pytest-github-actions-annotate-failures - name: Test with tox using minimal dependencies - run: tox -e py${{ matrix.python-version }}-mindeps + run: tox -e ${{ env.PY_VERSION }}-mindeps - name: Clean run: tox -e clean - name: Test with tox with all dependencies - run: tox -e py${{ matrix.python-version }}-alldeps + run: tox -e ${{ env.PY_VERSION }}-alldeps diff --git a/tox.ini b/tox.ini index 9e4dc0843..f95361025 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = True -envlist = clean,py{3.6,3.7,3.8,3.9}-{mindeps,alldeps},report +envlist = clean,py{36,37,38,39}-{mindeps,alldeps},report [pytest] testpaths = adaptive From fddcce8a210b4365161271eefb8c6bac2014f722 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 7 Mar 2021 14:57:55 +0100 Subject: [PATCH 23/23] use bash shell --- .github/workflows/tox.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 23e09ebf1..09b70c35f 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -22,6 +22,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Set Python version for tox run: echo "PY_VERSION=$(echo py${version//./})" >> $GITHUB_ENV + shell: bash env: version: ${{ matrix.python-version }} - name: Register Python problem matcher