Skip to content

Commit 3991c85

Browse files
committed
Run Python 3.6 test on older Ubuntu.
3.6 not available for 22.04 or latest.
1 parent e61a11e commit 3991c85

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

.github/workflows/test-doc-builder.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,40 @@ permissions:
1515
contents: read
1616
jobs:
1717

18-
test-pythons:
18+
test-python-oldest:
19+
name: Test in Python ${{ matrix.python-version }}
20+
runs-on: ubuntu-20.04
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
# If testing with in "act" on Macs, make sure to add '--container-architecture linux/amd64'.
25+
python-version: [3.6]
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
lfs: true
31+
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
37+
- name: Unit/system tests
38+
if: success() || failure()
39+
run: |
40+
make -C test
41+
# -C test is needed because, if you just cd test/ beforehand, git commands in tests fail with an error
42+
43+
test-python-latest:
1944
name: Test in Python ${{ matrix.python-version }}
2045
runs-on: ubuntu-latest
2146
strategy:
2247
fail-fast: false
2348
matrix:
2449
# If testing with in "act" on Macs, make sure to add '--container-architecture linux/amd64'.
2550
# Even then, old Python versions might not be available.
26-
python-version: [3.6, 3.x]
51+
python-version: [3.x]
2752
steps:
2853
- uses: actions/checkout@v4
2954
with:
@@ -69,12 +94,12 @@ jobs:
6994
conda run -n doc-builder-python3.6 make -C test
7095
# -C test is needed because, if you just cd test/ beforehand, git commands in tests fail with an error
7196

72-
# File an issue if either of the above jobs failed during a scheduled or manual run
97+
# File an issue if any of above jobs failed during a scheduled or manual run
7398
file-issue-on-failure:
7499
if: |
75-
(needs.test-pythons.result == 'failure' || needs.lint-and-test-conda.result == 'failure') &&
100+
(needs.test-python-oldest.result == 'failure' || needs.test-python-latest.result == 'failure' || needs.lint-and-test-conda.result == 'failure') &&
76101
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
77-
needs: [test-pythons, lint-and-test-conda]
102+
needs: [test-python-oldest, test-python-latest, lint-and-test-conda]
78103
runs-on: ubuntu-latest
79104
steps:
80105
- uses: actions/checkout@v3
@@ -87,4 +112,3 @@ jobs:
87112
filename: .github/workflows/docs-ctsm_pylib.issue_template.md
88113
update_existing: true
89114
search_existing: open
90-

0 commit comments

Comments
 (0)