Show More
@@ -1,76 +1,80 b'' | |||||
1 | name: Run tests |
|
1 | name: Run tests | |
2 |
|
2 | |||
3 | on: |
|
3 | on: | |
4 | push: |
|
4 | push: | |
|
5 | branches: | |||
|
6 | - main | |||
|
7 | - master | |||
|
8 | - '*.x' | |||
5 | pull_request: |
|
9 | pull_request: | |
6 | # Run weekly on Monday at 1:23 UTC |
|
10 | # Run weekly on Monday at 1:23 UTC | |
7 | schedule: |
|
11 | schedule: | |
8 | - cron: '23 1 * * 1' |
|
12 | - cron: '23 1 * * 1' | |
9 | workflow_dispatch: |
|
13 | workflow_dispatch: | |
10 |
|
14 | |||
11 |
|
15 | |||
12 | jobs: |
|
16 | jobs: | |
13 | test: |
|
17 | test: | |
14 | runs-on: ${{ matrix.os }} |
|
18 | runs-on: ${{ matrix.os }} | |
15 | strategy: |
|
19 | strategy: | |
16 | matrix: |
|
20 | matrix: | |
17 | os: [ubuntu-latest, windows-latest] |
|
21 | os: [ubuntu-latest, windows-latest] | |
18 | python-version: ["3.8", "3.9", "3.10"] |
|
22 | python-version: ["3.8", "3.9", "3.10"] | |
19 | deps: [test_extra] |
|
23 | deps: [test_extra] | |
20 | # Test all on ubuntu, test ends on macos |
|
24 | # Test all on ubuntu, test ends on macos | |
21 | include: |
|
25 | include: | |
22 | - os: macos-latest |
|
26 | - os: macos-latest | |
23 | python-version: "3.8" |
|
27 | python-version: "3.8" | |
24 | deps: test_extra |
|
28 | deps: test_extra | |
25 | - os: macos-latest |
|
29 | - os: macos-latest | |
26 | python-version: "3.10" |
|
30 | python-version: "3.10" | |
27 | deps: test_extra |
|
31 | deps: test_extra | |
28 | # Tests minimal dependencies set |
|
32 | # Tests minimal dependencies set | |
29 | - os: ubuntu-latest |
|
33 | - os: ubuntu-latest | |
30 | python-version: "3.10" |
|
34 | python-version: "3.10" | |
31 | deps: test |
|
35 | deps: test | |
32 | # Tests latest development Python version |
|
36 | # Tests latest development Python version | |
33 | - os: ubuntu-latest |
|
37 | - os: ubuntu-latest | |
34 | python-version: "3.11-dev" |
|
38 | python-version: "3.11-dev" | |
35 | deps: test |
|
39 | deps: test | |
36 | # Installing optional dependencies stuff takes ages on PyPy |
|
40 | # Installing optional dependencies stuff takes ages on PyPy | |
37 | - os: ubuntu-latest |
|
41 | - os: ubuntu-latest | |
38 | python-version: "pypy-3.8" |
|
42 | python-version: "pypy-3.8" | |
39 | deps: test |
|
43 | deps: test | |
40 | - os: windows-latest |
|
44 | - os: windows-latest | |
41 | python-version: "pypy-3.8" |
|
45 | python-version: "pypy-3.8" | |
42 | deps: test |
|
46 | deps: test | |
43 | - os: macos-latest |
|
47 | - os: macos-latest | |
44 | python-version: "pypy-3.8" |
|
48 | python-version: "pypy-3.8" | |
45 | deps: test |
|
49 | deps: test | |
46 |
|
50 | |||
47 | steps: |
|
51 | steps: | |
48 | - uses: actions/checkout@v2 |
|
52 | - uses: actions/checkout@v2 | |
49 | - name: Set up Python ${{ matrix.python-version }} |
|
53 | - name: Set up Python ${{ matrix.python-version }} | |
50 | uses: actions/setup-python@v2 |
|
54 | uses: actions/setup-python@v2 | |
51 | with: |
|
55 | with: | |
52 | python-version: ${{ matrix.python-version }} |
|
56 | python-version: ${{ matrix.python-version }} | |
53 | cache: pip |
|
57 | cache: pip | |
54 | - name: Install latex |
|
58 | - name: Install latex | |
55 | if: runner.os == 'Linux' && matrix.deps == 'test_extra' |
|
59 | if: runner.os == 'Linux' && matrix.deps == 'test_extra' | |
56 | run: sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng |
|
60 | run: sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng | |
57 | - name: Install and update Python dependencies |
|
61 | - name: Install and update Python dependencies | |
58 | run: | |
|
62 | run: | | |
59 | python -m pip install --upgrade pip setuptools wheel build |
|
63 | python -m pip install --upgrade pip setuptools wheel build | |
60 | python -m pip install --upgrade -e .[${{ matrix.deps }}] |
|
64 | python -m pip install --upgrade -e .[${{ matrix.deps }}] | |
61 | python -m pip install --upgrade check-manifest pytest-cov |
|
65 | python -m pip install --upgrade check-manifest pytest-cov | |
62 | - name: Try building with Python build |
|
66 | - name: Try building with Python build | |
63 | if: runner.os != 'Windows' # setup.py does not support sdist on Windows |
|
67 | if: runner.os != 'Windows' # setup.py does not support sdist on Windows | |
64 | run: | |
|
68 | run: | | |
65 | python -m build |
|
69 | python -m build | |
66 | shasum -a 256 dist/* |
|
70 | shasum -a 256 dist/* | |
67 | - name: Check manifest |
|
71 | - name: Check manifest | |
68 | if: runner.os != 'Windows' # setup.py does not support sdist on Windows |
|
72 | if: runner.os != 'Windows' # setup.py does not support sdist on Windows | |
69 | run: check-manifest |
|
73 | run: check-manifest | |
70 | - name: pytest |
|
74 | - name: pytest | |
71 | env: |
|
75 | env: | |
72 | COLUMNS: 120 |
|
76 | COLUMNS: 120 | |
73 | run: | |
|
77 | run: | | |
74 | pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} |
|
78 | pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} | |
75 | - name: Upload coverage to Codecov |
|
79 | - name: Upload coverage to Codecov | |
76 | uses: codecov/codecov-action@v2 |
|
80 | uses: codecov/codecov-action@v2 |
General Comments 0
You need to be logged in to leave comments.
Login now