|
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 | julia: |
15 | | - name: Test (${{ matrix.os }}, julia ${{ matrix.jlversion }}) |
| 15 | + name: Test Julia (${{ matrix.jlversion }}, ${{ matrix.os }}) |
16 | 16 | runs-on: ${{ matrix.os }} |
17 | 17 | strategy: |
18 | | - fail-fast: true |
| 18 | + fail-fast: false |
19 | 19 | matrix: |
20 | 20 | arch: [x64] # x86 unsupported by MicroMamba |
21 | 21 | os: [ubuntu-latest, windows-latest, macos-latest] |
22 | 22 | jlversion: ['1','1.9'] |
| 23 | + |
23 | 24 | steps: |
24 | 25 | - uses: actions/checkout@v4 |
| 26 | + |
25 | 27 | - name: Set up Julia ${{ matrix.jlversion }} |
26 | 28 | uses: julia-actions/setup-julia@v2 |
27 | 29 | with: |
28 | 30 | version: ${{ matrix.jlversion }} |
29 | 31 | arch: ${{ matrix.arch }} |
| 32 | + |
30 | 33 | - uses: julia-actions/cache@v2 |
| 34 | + |
31 | 35 | - name: Build package |
32 | 36 | uses: julia-actions/julia-buildpkg@v1 |
| 37 | + |
33 | 38 | - name: Run tests |
34 | 39 | uses: julia-actions/julia-runtest@v1 |
35 | 40 | env: |
36 | 41 | JULIA_DEBUG: PythonCall |
37 | 42 | JULIA_NUM_THREADS: '2' |
| 43 | + |
38 | 44 | - name: Process coverage |
39 | 45 | uses: julia-actions/julia-processcoverage@v1 |
| 46 | + |
40 | 47 | - name: Upload coverage to Codecov |
41 | 48 | uses: codecov/codecov-action@v5 |
42 | 49 | env: |
43 | 50 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 51 | + |
44 | 52 | python: |
45 | | - name: Test (${{ matrix.os }}, python ${{ matrix.pyversion }}) |
| 53 | + name: Test Python (${{ matrix.pyversion }}, ${{ matrix.os }}) |
46 | 54 | runs-on: ${{ matrix.os }} |
47 | 55 | strategy: |
48 | | - fail-fast: true |
| 56 | + fail-fast: false |
49 | 57 | matrix: |
50 | 58 | os: [ubuntu-latest, windows-latest, macos-latest] |
51 | | - pyversion: ["3.x", "3.8"] |
| 59 | + pyversion: ["3", "3.8"] |
| 60 | + |
52 | 61 | steps: |
53 | 62 | - uses: actions/checkout@v4 |
| 63 | + |
54 | 64 | - name: Set up Python ${{ matrix.pyversion }} |
55 | 65 | uses: actions/setup-python@v5 |
56 | 66 | with: |
57 | 67 | python-version: ${{ matrix.pyversion }} |
| 68 | + |
| 69 | + - name: Set up uv |
| 70 | + uses: astral-sh/setup-uv@v6 |
| 71 | + with: |
| 72 | + python-version: ${{ matrix.pyversion }} |
| 73 | + |
58 | 74 | - name: Set up Julia |
59 | 75 | uses: julia-actions/setup-julia@v2 |
60 | 76 | with: |
61 | 77 | version: '1' |
| 78 | + |
62 | 79 | - name: Install dependencies |
63 | 80 | run: | |
64 | | - python -m pip install --upgrade pip |
65 | | - pip install flake8 pytest pytest-cov nbval numpy |
66 | 81 | cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json |
67 | | - pip install -e . |
| 82 | + uv sync --dev |
| 83 | +
|
68 | 84 | - name: Lint with flake8 |
69 | 85 | run: | |
70 | 86 | # stop the build if there are Python syntax errors or undefined names |
71 | | - flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics |
| 87 | + uv run flake8 ./pysrc ./pytest --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics |
72 | 88 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
73 | | - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 89 | + uv run flake8 ./pysrc ./pytest --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 90 | +
|
74 | 91 | - name: Run tests |
75 | 92 | run: | |
76 | | - pytest -s --nbval --cov=pysrc ./pytest/ |
| 93 | + uv run pytest -s --nbval --cov=pysrc ./pytest/ |
77 | 94 | env: |
78 | 95 | PYTHON_JULIACALL_THREADS: '2' |
| 96 | + |
79 | 97 | - name: Upload coverage to Codecov |
80 | 98 | uses: codecov/codecov-action@v5 |
81 | 99 | env: |
|
0 commit comments