|
11 | 11 | - main
|
12 | 12 |
|
13 | 13 | jobs:
|
14 |
| - build-pip: |
15 |
| - name: pip - ${{matrix.os}} - ${{matrix.python-version}} |
| 14 | + build: |
| 15 | + name: ${{matrix.os}} - ${{matrix.python-version}} |
16 | 16 | runs-on: ${{ matrix.os }}
|
17 | 17 | strategy:
|
18 | 18 | matrix:
|
19 | 19 | os: [ubuntu-latest, windows-latest, macos-latest]
|
20 | 20 | python-version: ["3.9", "3.13"]
|
21 | 21 |
|
22 |
| - |
23 | 22 | steps:
|
24 |
| - - uses: actions/checkout@v2 |
25 |
| - |
26 |
| - - uses: actions/setup-python@v3 |
27 |
| - with: |
28 |
| - python-version: ${{matrix.python-version}} |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - uses: actions/setup-python@v3 |
| 25 | + with: |
| 26 | + python-version: ${{matrix.python-version}} |
29 | 27 |
|
30 |
| - - name: Install PyImageJ |
31 |
| - run: | |
32 |
| - python -m pip install --upgrade pip |
33 |
| - python -m pip install -e '.[dev]' |
| 28 | + - name: Install uv |
| 29 | + run: | |
| 30 | + python -m pip install --upgrade pip |
| 31 | + python -m pip install uv |
34 | 32 |
|
35 |
| - - name: Test PyImageJ |
36 |
| - shell: bash |
37 |
| - run: | |
38 |
| - bin/test.sh |
| 33 | + - name: Test PyImageJ |
| 34 | + shell: bash |
| 35 | + run: | |
| 36 | + bin/test.sh |
39 | 37 |
|
40 | 38 | ensure-clean-code:
|
41 | 39 | runs-on: ubuntu-latest
|
42 | 40 | steps:
|
43 | 41 | - uses: actions/checkout@v2
|
44 | 42 | - uses: actions/setup-python@v3
|
45 | 43 |
|
| 44 | + - name: Install uv |
| 45 | + run: | |
| 46 | + python -m pip install --upgrade pip |
| 47 | + python -m pip install uv |
| 48 | +
|
46 | 49 | - name: Lint code
|
47 | 50 | run: |
|
48 |
| - python -m pip install ruff |
49 |
| - ruff check |
50 |
| - ruff format --check |
| 51 | + uv run ruff check |
| 52 | + uv run ruff format --check |
51 | 53 |
|
52 | 54 | - name: Validate pyproject.toml
|
53 | 55 | run: |
|
54 |
| - python -m pip install validate-pyproject[all] |
55 |
| - python -m validate_pyproject pyproject.toml |
| 56 | + uv run validate-pyproject pyproject.toml |
56 | 57 |
|
57 |
| - conda-dev-test: |
58 |
| - name: Conda Setup & Code Coverage |
59 |
| - runs-on: ubuntu-latest |
60 |
| - defaults: |
61 |
| - # Steps that rely on the activated environment must be run with this shell setup. |
62 |
| - # See https://github.com/marketplace/actions/setup-miniconda#important |
63 |
| - run: |
64 |
| - shell: bash -l {0} |
65 |
| - steps: |
66 |
| - - uses: actions/checkout@v2 |
67 |
| - - name: Cache conda |
68 |
| - uses: actions/cache@v4 |
69 |
| - env: |
70 |
| - # Increase this value to reset cache if dev-environment.yml has not changed |
71 |
| - CACHE_NUMBER: 0 |
72 |
| - with: |
73 |
| - path: ~/conda_pkgs_dir |
74 |
| - key: |
75 |
| - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('dev-environment.yml') }} |
76 |
| - - uses: conda-incubator/setup-miniconda@v3 |
77 |
| - with: |
78 |
| - # Create env with dev packages |
79 |
| - auto-update-conda: true |
80 |
| - python-version: 3.9 |
81 |
| - miniforge-version: latest |
82 |
| - environment-file: dev-environment.yml |
83 |
| - # Activate pyimagej-dev environment |
84 |
| - activate-environment: pyimagej-dev |
85 |
| - auto-activate-base: false |
86 |
| - # Use mamba for faster setup |
87 |
| - use-mamba: true |
88 |
| - - name: Test pyimagej |
| 58 | + - name: Analyze code coverage |
89 | 59 | run: |
|
90 | 60 | bin/test.sh tests --cov-report=xml --cov=.
|
91 |
| - # We could do this in its own action, but we'd have to setup the environment again. |
92 |
| - - name: Upload Coverage to Codecov |
| 61 | +
|
| 62 | + - name: Upload coverage to Codecov |
93 | 63 | uses: codecov/codecov-action@v2
|
0 commit comments