Skip to content

Commit 330f471

Browse files
authored
Merge pull request #96 from csiro-coasts/update-ci-requirements
Update minimum versions, add tests against latest dependency versions
2 parents 8291144 + 8fdba37 commit 330f471

File tree

7 files changed

+165
-80
lines changed

7 files changed

+165
-80
lines changed

.github/actions/environment/action.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ inputs:
88
description: Name of the emsarray Python package artifact
99
required: false
1010
default: "Python package"
11+
install-latest:
12+
description: Install latest dependency versions instead of locked versions
13+
required: false
14+
# All inputs are forced to strings
15+
default: 'false'
1116

1217
runs:
1318
using: composite
@@ -21,7 +26,6 @@ runs:
2126
continuous-integration/requirements.txt
2227
continuous-integration/environment.yaml
2328
setup.cfg
24-
python-version: ${{ inputs.python-version }}
2529
2630
- name: Fetch built emsarray package
2731
uses: actions/download-artifact@v3
@@ -30,7 +34,7 @@ runs:
3034
path: "dist/"
3135

3236
- name: Cache conda packages
33-
uses: actions/cache@v2
37+
uses: actions/cache@v3
3438
with:
3539
path: ~/conda_pkgs_dir
3640
key:
@@ -40,17 +44,26 @@ runs:
4044
- name: Install base Conda environment
4145
uses: conda-incubator/setup-miniconda@v2
4246
with:
47+
mamba-version: "*"
4348
environment-file: continuous-integration/environment.yaml
4449
python-version: ${{ inputs.python-version }}
4550
channels: conda-forge
4651
- shell: bash -l {0}
4752
run: |
4853
conda install -c conda-forge wheel
4954
50-
51-
- name: Install Python packages
55+
- name: Install locked Python packages
56+
if: ${{ inputs.install-latest == 'false' }}
5257
shell: bash -l {0}
5358
run: |
5459
pip install \
5560
-r continuous-integration/requirements.txt \
5661
dist/emsarray-*.whl
62+
63+
- name: Install latest Python packages
64+
if: ${{ inputs.install-latest != 'false'}}
65+
shell: bash -l {0}
66+
run: |
67+
wheels=( dist/emsarray-*.whl )
68+
echo "${wheels[@]}"
69+
pip install "${wheels[0]}[testing]"

.github/workflows/ci.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,29 @@ jobs:
3131
run: unzip -l dist/*.whl | grep -q py.typed
3232

3333
test:
34+
name: python ${{ matrix.python-version }}, ${{ matrix.experimental && 'latest' || 'pinned' }} dependencies
3435
runs-on: ubuntu-latest
3536
timeout-minutes: 10
3637
needs: ["build"]
3738

39+
# Allow failures for the latest versions
40+
continue-on-error: ${{ matrix.experimental }}
3841
strategy:
3942
fail-fast: false
4043
matrix:
41-
python-version: ["3.8", "3.9", "3.10", "3.11"]
44+
python-version: ["3.9", "3.10", "3.11"]
45+
experimental: [false]
46+
include:
47+
- python-version: "3.11"
48+
experimental: true
4249

4350
steps:
4451
- uses: actions/checkout@v3
4552
- uses: ./.github/actions/environment
4653
with:
4754
python-version: ${{ matrix.python-version }}
4855
package-artifact-name: ${{ needs.build.outputs.artifact-name }}
56+
install-latest: ${{ matrix.experimental }}
4957

5058
- name: Run tests
5159
shell: bash -l {0}

0 commit comments

Comments
 (0)