1111 - main
1212
1313jobs :
14- build-cross-platform :
14+ build :
1515 name : test ${{matrix.os}} - ${{matrix.python-version}} - ${{matrix.java-version}}
1616 runs-on : ${{ matrix.os }}
1717 strategy :
@@ -33,79 +33,27 @@ jobs:
3333 java-version : ' '
3434
3535 steps :
36- - uses : actions/checkout@v2
36+ - uses : actions/checkout@v4
3737
38- - uses : actions/setup-python@v3
38+ - uses : actions/setup-python@v5
3939 with :
4040 python-version : ${{matrix.python-version}}
4141
42- - uses : actions/setup-java@v3
42+ - uses : actions/setup-java@v4
4343 if : matrix.java-version != ''
4444 with :
4545 java-version : ${{matrix.java-version}}
4646 distribution : ' zulu'
4747 cache : ' maven'
4848
49- - name : Install ScyJava
49+ - name : Run tests
5050 run : |
51- python -m pip install --upgrade pip
52- python -m pip install -e '.[dev]'
51+ bin/test.sh
5352
54- - name : Test ScyJava
53+ - name : Lint code
5554 run : |
56- bin/test .sh --color=yes
55+ bin/lint .sh
5756
58- ensure-clean-code :
59- runs-on : ubuntu-latest
60- steps :
61- - uses : actions/checkout@v2
62- - uses : actions/setup-python@v3
63-
64- - name : Lint code
65- run : |
66- python -m pip install ruff
67- ruff check
68- ruff format --check
69-
70- - name : Validate pyproject.toml
71- run : |
72- python -m pip install validate-pyproject[all]
73- python -m validate_pyproject pyproject.toml
74-
75- conda-dev-test :
76- name : Conda Setup & Code Coverage
77- runs-on : ubuntu-latest
78- defaults :
79- # Steps that rely on the activated environment must be run with this shell setup.
80- # See https://github.com/marketplace/actions/setup-miniconda#important
81- run :
82- shell : bash -l {0}
83- steps :
84- - uses : actions/checkout@v2
85- - name : Cache conda
86- uses : actions/cache@v4
87- env :
88- # Increase this value to reset cache if dev-environment.yml has not changed
89- CACHE_NUMBER : 0
90- with :
91- path : ~/conda_pkgs_dir
92- key :
93- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('dev-environment.yml') }}
94- - uses : conda-incubator/setup-miniconda@v3
95- with :
96- # Create env with dev packages
97- auto-update-conda : true
98- python-version : 3.9
99- miniforge-version : latest
100- environment-file : dev-environment.yml
101- # Activate scyjava-dev environment
102- activate-environment : scyjava-dev
103- auto-activate-base : false
104- # Use mamba for faster setup
105- use-mamba : true
106- - name : Test scyjava
107- run : |
108- bin/test.sh --cov-report=xml --cov=.
109- # We could do this in its own action, but we'd have to setup the environment again.
110- - name : Upload Coverage to Codecov
111- uses : codecov/codecov-action@v2
57+ - name : Upload coverage
58+ if : matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.13' && matrix.java-version == '11'
59+ uses : codecov/codecov-action@v4
0 commit comments