|
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 | | - jlversion: ['1','1.6'] |
| 22 | + jlversion: ['1','1.9'] |
| 23 | + |
23 | 24 | steps: |
24 | | - - uses: actions/checkout@v2 |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + |
25 | 27 | - name: Set up Julia ${{ matrix.jlversion }} |
26 | | - uses: julia-actions/setup-julia@v1 |
| 28 | + uses: julia-actions/setup-julia@v2 |
27 | 29 | with: |
28 | 30 | version: ${{ matrix.jlversion }} |
29 | 31 | arch: ${{ matrix.arch }} |
30 | | - - uses: actions/cache@v1 |
31 | | - env: |
32 | | - cache-name: cache-artifacts |
33 | | - with: |
34 | | - path: ~/.julia/artifacts |
35 | | - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} |
36 | | - restore-keys: | |
37 | | - ${{ runner.os }}-test-${{ env.cache-name }}- |
38 | | - ${{ runner.os }}-test- |
39 | | - ${{ runner.os }}- |
| 32 | + |
| 33 | + - uses: julia-actions/cache@v2 |
| 34 | + |
40 | 35 | - name: Build package |
41 | 36 | uses: julia-actions/julia-buildpkg@v1 |
| 37 | + |
42 | 38 | - name: Run tests |
43 | 39 | uses: julia-actions/julia-runtest@v1 |
44 | 40 | env: |
45 | 41 | JULIA_DEBUG: PythonCall |
| 42 | + JULIA_NUM_THREADS: '2' |
| 43 | + |
46 | 44 | - name: Process coverage |
47 | 45 | uses: julia-actions/julia-processcoverage@v1 |
| 46 | + |
48 | 47 | - name: Upload coverage to Codecov |
49 | | - uses: codecov/codecov-action@v2 |
| 48 | + uses: codecov/codecov-action@v5 |
50 | 49 | env: |
51 | 50 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 51 | + |
52 | 52 | python: |
53 | | - name: Test (${{ matrix.os }}, python ${{ matrix.pyversion }}) |
| 53 | + name: Test Python (${{ matrix.pyversion }}, ${{ matrix.os }}) |
54 | 54 | runs-on: ${{ matrix.os }} |
55 | 55 | strategy: |
56 | | - fail-fast: true |
| 56 | + fail-fast: false |
57 | 57 | matrix: |
58 | 58 | os: [ubuntu-latest, windows-latest, macos-latest] |
59 | | - pyversion: ["3.x", "3.8"] |
| 59 | + pyversion: ["3", "3.8"] |
| 60 | + |
60 | 61 | steps: |
61 | | - - uses: actions/checkout@v3 |
| 62 | + - uses: actions/checkout@v4 |
| 63 | + |
62 | 64 | - name: Set up Python ${{ matrix.pyversion }} |
63 | | - uses: actions/setup-python@v4 |
| 65 | + uses: actions/setup-python@v5 |
| 66 | + with: |
| 67 | + python-version: ${{ matrix.pyversion }} |
| 68 | + |
| 69 | + - name: Set up uv |
| 70 | + uses: astral-sh/setup-uv@v6 |
64 | 71 | with: |
65 | 72 | python-version: ${{ matrix.pyversion }} |
| 73 | + |
66 | 74 | - name: Set up Julia |
67 | | - uses: julia-actions/setup-julia@v1 |
| 75 | + uses: julia-actions/setup-julia@v2 |
68 | 76 | with: |
69 | 77 | version: '1' |
| 78 | + |
70 | 79 | - name: Install dependencies |
71 | 80 | run: | |
72 | | - python -m pip install --upgrade pip |
73 | | - pip install flake8 pytest pytest-cov nbval numpy |
74 | 81 | cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json |
75 | | - pip install -e . |
| 82 | + uv sync --dev |
| 83 | +
|
76 | 84 | - name: Lint with flake8 |
77 | 85 | run: | |
78 | 86 | # stop the build if there are Python syntax errors or undefined names |
79 | | - 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 |
80 | 88 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
81 | | - 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 | +
|
82 | 91 | - name: Run tests |
83 | 92 | run: | |
84 | | - pytest -s --nbval --cov=pysrc ./pytest/ |
| 93 | + uv run pytest -s --nbval --cov=pysrc ./pytest/ |
| 94 | + env: |
| 95 | + PYTHON_JULIACALL_THREADS: '2' |
| 96 | + |
85 | 97 | - name: Upload coverage to Codecov |
86 | | - uses: codecov/codecov-action@v2 |
| 98 | + uses: codecov/codecov-action@v5 |
87 | 99 | env: |
88 | 100 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments