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