From dad5e71bfedeb76a25b3a7f0cf655a53157345d9 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 9 Jan 2022 17:39:16 +0100 Subject: [PATCH 1/5] Added PowerShell code. --- .github/workflows/UnitTesting.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index 5184b7a..b638ada 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -64,16 +64,16 @@ jobs: - name: ⏬ Checkout repository uses: actions/checkout@v2 - - if: matrix.system == 'msys2' - name: '🟦 Setup MSYS2' + - name: '🟦 Setup MSYS2' + if: matrix.system == 'msys2' uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true pacboy: python-pip:p - - if: matrix.system != 'msys2' - name: 🐍 Setup Python ${{ matrix.python }} + - name: 🐍 Setup Python ${{ matrix.python }} + if: matrix.system != 'msys2' uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} @@ -84,6 +84,13 @@ jobs: python -m pip install ${{ inputs.requirements }} - name: ☑ Run unit tests + if: matrix.system == 'windows' + run: | + $PYTEST_ARGS = if (${{ inputs.artifact }} -eq "") { '--junitxml=TestReport.xml' } else { '' } + python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes + + - name: ☑ Run unit tests + if: matrix.system != 'windows' run: | [ 'x${{ inputs.artifact }}' != 'x' ] && PYTEST_ARGS='--junitxml=TestReport.xml' || unset PYTEST_ARGS python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes From e1f7599d793a3a0f9bcf15a30c31a8a2c90228ff Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 9 Jan 2022 18:00:36 +0100 Subject: [PATCH 2/5] Added Python 3.11 (currently RC). --- .github/workflows/Parameters.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Parameters.yml b/.github/workflows/Parameters.yml index 57ffb43..0185534 100644 --- a/.github/workflows/Parameters.yml +++ b/.github/workflows/Parameters.yml @@ -86,11 +86,12 @@ jobs: print('WARNING: support for Python 3.6 ended in 2021.12.23') data = { 'python': { - '3.6': { 'icon': '⚫', 'until': '2021.12.23' }, - '3.7': { 'icon': '🔴', 'until': '2023.06.27' }, - '3.8': { 'icon': '🟠', 'until': '2024.10' }, - '3.9': { 'icon': '🟡', 'until': '2025.10' }, - '3.10': { 'icon': '🟢', 'until': '2026.10' }, + '3.6': { 'icon': '⚫', 'until': '2021.12.23' }, + '3.7': { 'icon': '🔴', 'until': '2023.06.27' }, + '3.8': { 'icon': '🟠', 'until': '2024.10' }, + '3.9': { 'icon': '🟡', 'until': '2025.10' }, + '3.10': { 'icon': '🟢', 'until': '2026.10' }, + '3.11': { 'icon': '🟣', 'until': '2027.10' }, }, 'sys': { 'ubuntu': { 'icon': '🐧', 'runs-on': 'ubuntu-latest', 'shell': 'bash' }, From 0fdef33cb47df825faf78be6cbf80bf20528ec42 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 9 Jan 2022 18:10:42 +0100 Subject: [PATCH 3/5] Improved PoSh code. --- .github/workflows/UnitTesting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index b638ada..b006c52 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -86,7 +86,7 @@ jobs: - name: ☑ Run unit tests if: matrix.system == 'windows' run: | - $PYTEST_ARGS = if (${{ inputs.artifact }} -eq "") { '--junitxml=TestReport.xml' } else { '' } + $PYTEST_ARGS = if ("${{ inputs.artifact }}".length -gt 0) { "--junitxml=TestReport.xml" } else { "" } python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes - name: ☑ Run unit tests From 94bb01d5869e05c1f3b12f55b22e3b1c1c25df1f Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 9 Jan 2022 18:18:34 +0100 Subject: [PATCH 4/5] Renamed Python 3.11 version. --- .github/workflows/Parameters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Parameters.yml b/.github/workflows/Parameters.yml index 0185534..565fa1e 100644 --- a/.github/workflows/Parameters.yml +++ b/.github/workflows/Parameters.yml @@ -107,7 +107,7 @@ jobs: 'runs-on': data['sys'][system]['runs-on'], 'shell': data['sys'][system]['shell'], 'pyicon': data['python'][version]['icon'], - 'python': version + 'python': '3.11.0-alpha.3' if version == '3.11' else version } for system in systems for version in (versions if system != 'msys2' else ['3.9']) From c9bee6fe65e131d3e00c6f77ce2303c9617224ae Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 9 Jan 2022 18:44:06 +0100 Subject: [PATCH 5/5] Require wheel to be installed before installing requirements. --- .github/workflows/UnitTesting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index b006c52..de622f5 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -80,7 +80,7 @@ jobs: - name: 🔧 Install dependencies run: | - python -m pip install -U pip + python -m pip install -U pip wheel python -m pip install ${{ inputs.requirements }} - name: ☑ Run unit tests