|
1 |
| -# TODO: Line 43, enable pytest --doctest-modules |
| 1 | +# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources |
| 2 | +# TODO: Line 48, enable pytest --doctest-modules |
2 | 3 |
|
3 | 4 | name: Tests
|
4 |
| -on: [push, pull_request] |
| 5 | +on: |
| 6 | + push: |
| 7 | + branches: [ main ] |
| 8 | + pull_request: |
| 9 | + branches: [ main ] |
5 | 10 | jobs:
|
6 | 11 | Tests:
|
7 | 12 | strategy:
|
8 | 13 | fail-fast: false
|
9 | 14 | max-parallel: 15
|
10 | 15 | matrix:
|
11 |
| - node: [12.x, 14.x, 16.x] |
| 16 | + node: [14.x, 16.x, 18.x] |
12 | 17 | python: ["3.6", "3.8", "3.10"]
|
13 | 18 | os: [macos-latest, ubuntu-latest, windows-latest]
|
14 | 19 | runs-on: ${{ matrix.os }}
|
15 | 20 | steps:
|
16 | 21 | - name: Checkout Repository
|
17 |
| - uses: actions/checkout@v2 |
| 22 | + uses: actions/checkout@v3 |
18 | 23 | - name: Use Node.js ${{ matrix.node }}
|
19 | 24 | uses: actions/setup-node@v3
|
20 | 25 | with:
|
21 | 26 | node-version: ${{ matrix.node }}
|
22 | 27 | - name: Use Python ${{ matrix.python }}
|
23 |
| - uses: actions/setup-python@v3 |
| 28 | + uses: actions/setup-python@v4 |
24 | 29 | with:
|
25 | 30 | python-version: ${{ matrix.python }}
|
26 | 31 | env:
|
27 |
| - PYTHON_VERSION: ${{ matrix.python }} |
| 32 | + PYTHON_VERSION: ${{ matrix.python }} # Why do this? |
28 | 33 | - name: Install Dependencies
|
29 | 34 | run: |
|
30 | 35 | npm install --no-progress
|
31 | 36 | pip install flake8 pytest
|
32 | 37 | - name: Set Windows environment
|
33 |
| - if: matrix.os == 'windows-latest' |
| 38 | + if: startsWith(matrix.os, 'windows') |
34 | 39 | run: |
|
35 | 40 | echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
|
36 | 41 | echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
|
37 | 42 | - name: Lint Python
|
38 |
| - if: matrix.os == 'ubuntu-latest' |
| 43 | + if: startsWith(matrix.os, 'ubuntu') |
39 | 44 | run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics
|
40 | 45 | - name: Run Python tests
|
41 | 46 | run: python -m pytest
|
42 | 47 | # - name: Run doctests with pytest
|
43 | 48 | # run: python -m pytest --doctest-modules
|
| 49 | + - name: Environment Information |
| 50 | + run: npx envinfo |
44 | 51 | - name: Run Node tests
|
45 | 52 | run: npm test
|
0 commit comments