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