Skip to content

Commit 67b197d

Browse files
committed
Bump python versions used for tests & update workflow with job to report total outcome
1 parent 433490f commit 67b197d

File tree

2 files changed

+74
-83
lines changed

2 files changed

+74
-83
lines changed

.github/workflows/test-install.yml

Lines changed: 28 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ env:
2121
INSTALLTRIMESH: 1
2222
INSTALLZMQ: 1
2323
NUMPY: numpy
24-
PYTHONVERSION_MAX: 3.12
25-
PYTHONVERSION_MIN: 3.7
26-
PYTHONVERSION_STD: 3.9
24+
PYTHONVERSION_MAX: '3.12'
25+
PYTHONVERSION_MIN: '3.9'
26+
PYTHONVERSION_STD: '3.11'
2727
TMPDIR: /tmp/
2828
USEVIRTUALENV: 0
2929
YGG_GHA_JOB_ID_SUFFIX: null
3030
jobs:
31-
build_sdist:
32-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
33-
name: Build source distribution
31+
all_tests_passed:
32+
if: always()
33+
name: All tests passed
3434
needs:
3535
- test_pip
3636
- test_conda
@@ -40,6 +40,19 @@ jobs:
4040
- docs
4141
runs-on: ubuntu-latest
4242
steps:
43+
- if: ${{ !(contains(needs.*.result, 'failure')) }}
44+
name: All tests ok
45+
run: exit 0
46+
- if: ${{ contains(needs.*.result, 'failure') }}
47+
name: Some tests failed
48+
run: exit 1
49+
build_sdist:
50+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
51+
name: Build source distribution
52+
needs:
53+
- all_tests_passed
54+
runs-on: ubuntu-latest
55+
steps:
4356
- name: Checkout sources
4457
uses: actions/checkout@v4
4558
with:
@@ -54,7 +67,7 @@ jobs:
5467
- name: Set up Python
5568
uses: actions/setup-python@v5
5669
with:
57-
python-version: std
70+
python-version: ${{ env.PYTHONVERSION_STD }}
5871
- name: Install build utilities
5972
run: 'python -m pip install build
6073
@@ -84,12 +97,7 @@ jobs:
8497
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
8598
name: Build wheels on ${{ matrix.os }}
8699
needs:
87-
- test_pip
88-
- test_conda
89-
- test_rmq_pip
90-
- test_rmq_conda
91-
- test_stripped
92-
- docs
100+
- all_tests_passed
93101
runs-on: ${{ matrix.os }}
94102
steps:
95103
- name: Checkout sources
@@ -151,12 +159,7 @@ jobs:
151159
== '0 10 1 * *'
152160
name: Build and Publish Docker images
153161
needs:
154-
- test_pip
155-
- test_conda
156-
- test_rmq_pip
157-
- test_rmq_conda
158-
- test_stripped
159-
- docs
162+
- all_tests_passed
160163
runs-on: ubuntu-latest
161164
steps:
162165
- uses: actions/checkout@v4
@@ -171,7 +174,7 @@ jobs:
171174
- name: Set up Python
172175
uses: actions/setup-python@v5
173176
with:
174-
python-version: std
177+
python-version: ${{ env.PYTHONVERSION_STD }}
175178
- name: Login to DockerHub
176179
uses: docker/login-action@v1
177180
with:
@@ -249,12 +252,7 @@ jobs:
249252
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
250253
name: Update the schema used by the model submission form
251254
needs:
252-
- test_pip
253-
- test_conda
254-
- test_rmq_pip
255-
- test_rmq_conda
256-
- test_stripped
257-
- docs
255+
- all_tests_passed
258256
runs-on: ubuntu-latest
259257
steps:
260258
- uses: actions/checkout@v4
@@ -269,7 +267,7 @@ jobs:
269267
- name: Set up Python
270268
uses: actions/setup-python@v5
271269
with:
272-
python-version: std
270+
python-version: ${{ env.PYTHONVERSION_STD }}
273271
- name: Install dependencies
274272
run: 'python -m pip install PyGithub
275273
@@ -634,7 +632,7 @@ jobs:
634632
install-r: false
635633
install-sbml: false
636634
os-base: ubuntu
637-
python-version: 3.7
635+
python-version: min
638636
test-flags1: long
639637
test-flags2: empty
640638
- install-c: true
@@ -644,7 +642,7 @@ jobs:
644642
install-r: true
645643
install-sbml: true
646644
os-base: ubuntu
647-
python-version: 3.9
645+
python-version: std
648646
test-flags1: long-remote-service
649647
test-flags2: examples-sbml
650648
- install-c: true
@@ -654,29 +652,9 @@ jobs:
654652
install-r: true
655653
install-sbml: false
656654
os-base: ubuntu
657-
python-version: '3.10'
655+
python-version: max
658656
test-flags1: long
659657
test-flags2: empty
660-
- install-c: true
661-
install-method: conda
662-
install-mpi: false
663-
install-pytorch: true
664-
install-r: true
665-
install-sbml: false
666-
os-base: ubuntu
667-
python-version: '3.11'
668-
test-flags1: long
669-
test-flags2: empty
670-
- install-c: true
671-
install-method: conda
672-
install-mpi: false
673-
install-pytorch: true
674-
install-r: true
675-
install-sbml: false
676-
os-base: macos
677-
python-version: 3.8
678-
test-flags1: examples-rpc-lesson3
679-
test-flags2: tools
680658
install-c:
681659
- true
682660
install-method:

utils/test-install-base.yml

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ name: Test of package installation & execution
1111
- cron: "0 10 1 * *" # 3AM PST once a month
1212

1313
env:
14-
PYTHONVERSION_MIN: 3.7
15-
PYTHONVERSION_MAX: 3.12
16-
PYTHONVERSION_STD: 3.9
14+
PYTHONVERSION_MIN: "3.9"
15+
PYTHONVERSION_MAX: "3.12"
16+
PYTHONVERSION_STD: "3.11"
1717
NUMPY: numpy
1818
INSTALLR: 0 # TODO: temp
1919
INSTALLC: 1
@@ -442,7 +442,7 @@ jobs:
442442
install-pytorch: [true]
443443
include:
444444
- os-base: ubuntu
445-
python-version: 3.7
445+
python-version: min
446446
install-method: conda
447447
test-flags1: long
448448
test-flags2: empty
@@ -452,7 +452,7 @@ jobs:
452452
install-sbml: false
453453
install-pytorch: false
454454
- os-base: ubuntu
455-
python-version: 3.9
455+
python-version: std
456456
install-method: conda
457457
test-flags1: long-remote-service
458458
test-flags2: examples-sbml
@@ -462,7 +462,7 @@ jobs:
462462
install-sbml: true
463463
install-pytorch: true
464464
- os-base: ubuntu
465-
python-version: "3.10"
465+
python-version: max
466466
install-method: conda
467467
test-flags1: long
468468
test-flags2: empty
@@ -472,26 +472,26 @@ jobs:
472472
install-mpi: false
473473
install-sbml: false
474474
install-pytorch: true
475-
- os-base: ubuntu
476-
python-version: "3.11"
477-
install-method: conda
478-
test-flags1: long
479-
test-flags2: empty
480-
install-c: true
481-
install-r: true
482-
install-mpi: false
483-
install-sbml: false
484-
install-pytorch: true
485-
- os-base: macos
486-
python-version: 3.8
487-
install-method: conda
488-
test-flags1: examples-rpc-lesson3
489-
test-flags2: tools
490-
install-c: true
491-
install-r: true
492-
install-mpi: false
493-
install-sbml: false
494-
install-pytorch: true
475+
# - os-base: ubuntu
476+
# python-version: "3.11"
477+
# install-method: conda
478+
# test-flags1: long
479+
# test-flags2: empty
480+
# install-c: true
481+
# install-r: true
482+
# install-mpi: false
483+
# install-sbml: false
484+
# install-pytorch: true
485+
# - os-base: macos
486+
# python-version: 3.8
487+
# install-method: conda
488+
# test-flags1: examples-rpc-lesson3
489+
# test-flags2: tools
490+
# install-c: true
491+
# install-r: true
492+
# install-mpi: false
493+
# install-sbml: false
494+
# install-pytorch: true
495495
fail-fast: false
496496
defaults:
497497
run:
@@ -621,9 +621,22 @@ jobs:
621621
BRANCH: gh-pages
622622
FOLDER: docs/build/html/
623623

624+
all_tests_passed:
625+
runs-on: ubuntu-latest
626+
name: All tests passed
627+
needs: [test_pip, test_conda, test_rmq_pip, test_rmq_conda, test_stripped, docs]
628+
if: always()
629+
steps:
630+
- name: All tests ok
631+
if: ${{ !(contains(needs.*.result, 'failure')) }}
632+
run: exit 0
633+
- name: Some tests failed
634+
if: ${{ contains(needs.*.result, 'failure') }}
635+
run: exit 1
636+
624637
build_wheels:
625638
name: Build wheels on ${{ matrix.os }}
626-
needs: [test_pip, test_conda, test_rmq_pip, test_rmq_conda, test_stripped, docs]
639+
needs: [all_tests_passed]
627640
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
628641
runs-on: ${{ matrix.os }}
629642
strategy:
@@ -683,7 +696,7 @@ jobs:
683696

684697
build_sdist:
685698
name: Build source distribution
686-
needs: [test_pip, test_conda, test_rmq_pip, test_rmq_conda, test_stripped, docs]
699+
needs: [all_tests_passed]
687700
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
688701
runs-on: ubuntu-latest
689702
steps:
@@ -699,7 +712,7 @@ jobs:
699712
- name: Set up Python
700713
uses: actions/setup-python@v5
701714
with:
702-
python-version: std
715+
python-version: ${{ env.PYTHONVERSION_STD }}
703716
- name: Install build utilities
704717
run: |
705718
python -m pip install build
@@ -756,7 +769,7 @@ jobs:
756769

757770
docker:
758771
name: Build and Publish Docker images
759-
needs: [test_pip, test_conda, test_rmq_pip, test_rmq_conda, test_stripped, docs]
772+
needs: [all_tests_passed]
760773
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || github.event.schedule == '0 10 1 * *'
761774
runs-on: ubuntu-latest
762775
steps:
@@ -770,7 +783,7 @@ jobs:
770783
- name: Set up Python
771784
uses: actions/setup-python@v5
772785
with:
773-
python-version: std
786+
python-version: ${{ env.PYTHONVERSION_STD }}
774787
- name: Login to DockerHub
775788
uses: docker/login-action@v1
776789
with:
@@ -783,7 +796,7 @@ jobs:
783796

784797
schema:
785798
name: Update the schema used by the model submission form
786-
needs: [test_pip, test_conda, test_rmq_pip, test_rmq_conda, test_stripped, docs]
799+
needs: [all_tests_passed]
787800
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
788801
runs-on: ubuntu-latest
789802
steps:
@@ -797,7 +810,7 @@ jobs:
797810
- name: Set up Python
798811
uses: actions/setup-python@v5
799812
with:
800-
python-version: std
813+
python-version: ${{ env.PYTHONVERSION_STD }}
801814
- name: Install dependencies
802815
run: |
803816
python -m pip install PyGithub

0 commit comments

Comments
 (0)