From 48554c2fe9572dc995ce0f5456417a3e6c858a07 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 13 Jul 2022 08:37:49 +0200 Subject: [PATCH 1/2] test: Upgrade GitHub Actions --- .github/workflows/tests.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 83ccf7f547..2136c28d76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,45 +1,52 @@ -# TODO: Line 43, enable pytest --doctest-modules +# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources +# TODO: Line 48, enable pytest --doctest-modules name: Tests -on: [push, pull_request] +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: Tests: strategy: fail-fast: false max-parallel: 15 matrix: - node: [12.x, 14.x, 16.x] + node: [14.x, 16.x, 18x] python: ["3.6", "3.8", "3.10"] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} env: - PYTHON_VERSION: ${{ matrix.python }} + PYTHON_VERSION: ${{ matrix.python }} # Why do this? - name: Install Dependencies run: | npm install --no-progress pip install flake8 pytest - name: Set Windows environment - if: matrix.os == 'windows-latest' + if: startsWith(matrix.os, 'windows') run: | echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV - name: Lint Python - if: matrix.os == 'ubuntu-latest' + if: startsWith(matrix.os, 'ubuntu') run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics - name: Run Python tests run: python -m pytest # - name: Run doctests with pytest # run: python -m pytest --doctest-modules + - name: Environment Information + run: npx envinfo - name: Run Node tests run: npm test From c9fc7e206372f6cbb952e7a1ca4ded20beee997c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 13 Jul 2022 08:59:22 +0200 Subject: [PATCH 2/2] node: 18x --> 18.x --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2136c28d76..a3b68bdd5d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false max-parallel: 15 matrix: - node: [14.x, 16.x, 18x] + node: [14.x, 16.x, 18.x] python: ["3.6", "3.8", "3.10"] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }}