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