|
8 | 8 | strategy: |
9 | 9 | matrix: |
10 | 10 | os: [macos-latest, ubuntu-latest, windows-latest] |
11 | | - python-version: ["3.8", "3.9", "3.9.1", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15.0-alpha.1"] |
| 11 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15.0-alpha.1"] |
12 | 12 |
|
13 | 13 | steps: |
14 | 14 | - uses: actions/checkout@v4 |
| 15 | + |
15 | 16 | - name: Set up Python ${{ matrix.python-version }} |
16 | 17 | uses: actions/setup-python@v5 |
17 | 18 | with: |
18 | 19 | python-version: ${{ matrix.python-version }} |
19 | 20 |
|
20 | | - - name: Install the library |
21 | | - shell: bash |
22 | | - run: pip install . |
23 | | - |
24 | 21 | - name: Cache pip dependencies |
25 | 22 | uses: actions/cache@v4 |
26 | 23 | with: |
27 | 24 | path: ~/.cache/pip |
28 | | - key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }} |
29 | | - restore-keys: | |
30 | | - ${{ runner.os }}-pip-${{ github.workflow }}- |
| 25 | + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }} |
31 | 26 |
|
32 | 27 | - name: Install dependencies |
33 | 28 | shell: bash |
34 | 29 | run: pip install -r requirements_dev.txt |
35 | 30 |
|
| 31 | + - name: Install the library |
| 32 | + shell: bash |
| 33 | + run: pip install . |
| 34 | + |
36 | 35 | - name: Print all libs |
37 | 36 | shell: bash |
38 | 37 | run: pip list |
39 | 38 |
|
40 | 39 | - name: Run tests and show coverage on the command line |
| 40 | + shell: bash |
41 | 41 | run: | |
42 | 42 | coverage run --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94 |
43 | 43 | coverage xml |
|
53 | 53 | continue-on-error: true |
54 | 54 |
|
55 | 55 | - name: Run tests and show the branch coverage on the command line |
| 56 | + shell: bash |
| 57 | + run: coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94 |
| 58 | + |
| 59 | + # 2. A separate job specifically for bug testing in Python 3.9.1 (Linux only) |
| 60 | + build-3-9-1: |
| 61 | + runs-on: ubuntu-latest |
| 62 | + container: python:3.9.1 |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v4 |
| 65 | + |
| 66 | + - name: Cache pip dependencies |
| 67 | + uses: actions/cache@v4 |
| 68 | + with: |
| 69 | + path: ~/.cache/pip |
| 70 | + key: ubuntu-pip-3.9.1-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }} |
| 71 | + |
| 72 | + - name: Install dependencies |
| 73 | + shell: bash |
| 74 | + run: pip install -r requirements_dev.txt |
| 75 | + |
| 76 | + - name: Install the library |
| 77 | + shell: bash |
| 78 | + run: pip install . |
| 79 | + |
| 80 | + - name: Print all libs |
| 81 | + shell: bash |
| 82 | + run: pip list |
| 83 | + |
| 84 | + - name: Run tests and show coverage on the command line |
| 85 | + shell: bash |
| 86 | + run: coverage run --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94 |
| 87 | + |
| 88 | + - name: Run tests and show the branch coverage on the command line |
| 89 | + shell: bash |
56 | 90 | run: coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94 |
0 commit comments