Skip to content

Commit 9f97b57

Browse files
committed
Test against latest published versions of all dependencies
These tests are optional and are allowed to fail. They act as indicators of future issues.
1 parent e496ba7 commit 9f97b57

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

.github/actions/environment/action.yaml

Lines changed: 16 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:
@@ -48,10 +52,18 @@ runs:
4852
run: |
4953
conda install -c conda-forge wheel
5054
51-
52-
- name: Install Python packages
55+
- name: Install locked Python packages
56+
if: ${{ inputs.install-latest == 'false' }}
5357
shell: bash -l {0}
5458
run: |
5559
pip install \
5660
-r continuous-integration/requirements.txt \
5761
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: 8 additions & 0 deletions
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:
4144
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}

tox.ini

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[tox]
22
isolated_build = true
3+
package = wheel
4+
wheel_build_env = .pkg
35
envlist =
4-
py{39,310,311}-pytest
6+
py{39,310,311}-pytest-locked
7+
py311-pytest-latest
58
lint,docs
69
skip_missing_interpreters = true
710
requires =
@@ -25,7 +28,11 @@ conda_deps =
2528
# Install the python dependencies through pip
2629
deps = -rcontinuous-integration/requirements.txt
2730

28-
[testenv:py{39,310,311}-pytest]
31+
[testenv:py{39,310,311}-pytest-{locked,latest}]
32+
deps =
33+
locked: -rcontinuous-integration/requirements.txt
34+
extras =
35+
latest: testing
2936
commands =
3037
pytest \
3138
--junitxml=junit-{envname}.xml \

0 commit comments

Comments
 (0)