Skip to content

Commit ee2036b

Browse files
committed
GH Actions: use explicit bash shell & other defaults
1 parent 7a57d49 commit ee2036b

File tree

8 files changed

+80
-10
lines changed

8 files changed

+80
-10
lines changed

.github/workflows/1_create_release_pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ on:
1111
required: false
1212
default: 'master'
1313

14+
concurrency:
15+
# Only let this run 1 at a time
16+
group: ${{ github.workflow }}
17+
cancel-in-progress: false
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
env:
24+
FORCE_COLOR: 2
25+
PIP_PROGRESS_BAR: off
26+
1427
jobs:
1528
create-release-pr:
1629
runs-on: ubuntu-latest

.github/workflows/2_auto_publish_release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@ on:
77
# NOTE: While this is too generic, we use the `if` condition of the job to narrow it down
88
# NOTE: Don't use `branches` as we might create release on any branch
99

10+
concurrency:
11+
# Only let this run 1 at a time
12+
group: ${{ github.workflow }}
13+
cancel-in-progress: false
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
1019
env:
20+
FORCE_COLOR: 2
21+
PIP_PROGRESS_BAR: off
1122
# Best not to include the GH token here, only do it for the steps that need it
1223
MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }}
1324
CHANGELOG_FILE: CHANGES.md

.github/workflows/bash.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ concurrency:
3131
group: ${{ github.workflow }}-${{ github.ref }}
3232
cancel-in-progress: true
3333

34+
defaults:
35+
run:
36+
shell: bash
37+
38+
env:
39+
FORCE_COLOR: 2
40+
PIP_PROGRESS_BAR: off
41+
3442
jobs:
3543
bash-docker:
3644
runs-on: ubuntu-latest

.github/workflows/build.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ on:
1010
- 'MANIFEST.in' # check packaging
1111
- 'pyproject.toml' # check build config
1212
- 'setup.cfg' # check deps and project config
13+
- '.gitignore'
14+
- '.github/workflows/build.yml'
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
defaults:
21+
run:
22+
shell: bash -leo pipefail {0}
23+
24+
env:
25+
FORCE_COLOR: 2
26+
PIP_PROGRESS_BAR: off
1327

1428
jobs:
1529
test:
@@ -18,21 +32,23 @@ jobs:
1832
strategy:
1933
fail-fast: false
2034
matrix:
21-
os: ['ubuntu-latest']
22-
python: ['3.8', '3.9', '3.10', '3.11']
23-
include:
24-
- os: 'ubuntu-22.04'
25-
python: '3.7'
35+
os: ['ubuntu-latest', 'macos-latest']
36+
python: ['3.7', '3.8', '3.9', '3.10', '3']
37+
exclude:
2638
- os: 'macos-latest'
27-
python: '3.8'
39+
python: '3.7'
2840
steps:
2941
- name: Checkout
3042
uses: actions/checkout@v4
3143

3244
- name: Setup Python
33-
uses: actions/setup-python@v5
45+
uses: mamba-org/setup-micromamba@v2
3446
with:
35-
python-version: ${{ matrix.python }}
47+
cache-environment: true
48+
post-cleanup: 'all'
49+
environment-name: cylc-build
50+
create-args: >-
51+
python=${{ matrix.python }}
3652
3753
- name: Build
3854
uses: cylc/release-actions/build-python-package@v1

.github/workflows/test_conda-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
1414
cancel-in-progress: true
1515

16+
defaults:
17+
run:
18+
shell: bash
19+
20+
env:
21+
FORCE_COLOR: 2
22+
1623
jobs:
1724
test_conda_install:
1825
runs-on: ubuntu-latest

.github/workflows/test_fast.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ defaults:
1616
run:
1717
shell: bash -c "exec $CONDA_PREFIX/bin/bash -elo pipefail {0}"
1818

19+
env:
20+
PIP_PROGRESS_BAR: off
21+
1922
jobs:
2023
test:
2124
runs-on: ${{ matrix.os }}
@@ -32,11 +35,9 @@ jobs:
3235
- os: 'ubuntu-latest'
3336
python-version: '3.9' # not the oldest, not the most recent version
3437
time-zone: 'XXX-09:35'
35-
3638
env:
3739
TZ: ${{ matrix.time-zone }}
3840
PYTEST_ADDOPTS: --cov --cov-append -n 5 --color=yes
39-
4041
steps:
4142
- name: Checkout
4243
uses: actions/checkout@v4
@@ -106,6 +107,8 @@ jobs:
106107
strategy:
107108
matrix:
108109
python-version: ['3']
110+
env:
111+
FORCE_COLOR: 2
109112
steps:
110113
- name: Checkout
111114
uses: actions/checkout@v4

.github/workflows/test_functional.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ defaults:
3636
run:
3737
shell: bash -c "exec $CONDA_PREFIX/bin/bash -elo pipefail {0}"
3838

39+
env:
40+
FORCE_COLOR: 2
41+
PIP_PROGRESS_BAR: off
42+
3943
jobs:
4044
test:
4145
runs-on: ${{ matrix.os }}

.github/workflows/test_tutorial_workflow.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: true
1919

20+
defaults:
21+
run:
22+
shell: bash
23+
24+
env:
25+
FORCE_COLOR: 2
26+
PIP_PROGRESS_BAR: off
27+
2028
jobs:
2129
test:
2230
strategy:

0 commit comments

Comments
 (0)