Skip to content

Commit 4b69bd2

Browse files
committed
Actions: Set globals for conda channel settings
All jobs should use the same conda settings. This sets global settings for conda channels and conda remove defaults settings in one place that is DRY and easy to configure
1 parent 9565386 commit 4b69bd2

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ on:
1010
- main
1111
- develop
1212

13-
# Coveralls coverage reporting toggle.
14-
# Set to false to ignore coveralls upload failures during outages.
15-
# Check status: https://status.coveralls.io/
13+
# Global configuration for all jobs. Can be overridden at the job level if needed.
1614
env:
15+
# Conda channels: Set conda forge as only channel and disable defaults channel
16+
CONDA_CHANNELS: conda-forge
17+
CONDA_REMOVE_DEFAULTS: true
18+
# Coveralls: Set to false to ignore upload failures during outages.
19+
# Check status: https://status.coveralls.io/
1720
COVERALLS_FAIL_ON_ERROR: false
1821

1922
jobs:
@@ -81,8 +84,8 @@ jobs:
8184
python-version: ${{ env.PYTHON_VER }}
8285
activate-environment: TESTconda
8386
use-only-tar-bz2: false
84-
channels: conda-forge
85-
conda-remove-defaults: true
87+
channels: ${{ env.CONDA_CHANNELS }}
88+
conda-remove-defaults: ${{ env.CONDA_REMOVE_DEFAULTS }}
8689

8790
- name: Create MHKiT Conda environment
8891
shell: bash -l {0}
@@ -134,6 +137,8 @@ jobs:
134137
activate-environment: TEST
135138
python-version: ${{ env.PYTHON_VER }}
136139
use-only-tar-bz2: false
140+
channels: ${{ env.CONDA_CHANNELS }}
141+
conda-remove-defaults: ${{ env.CONDA_REMOVE_DEFAULTS }}
137142

138143
- name: Create MHKiT Conda environment
139144
shell: bash -l {0}
@@ -183,6 +188,8 @@ jobs:
183188
activate-environment: TEST
184189
python-version: ${{ env.PYTHON_VER }}
185190
use-only-tar-bz2: false
191+
channels: ${{ env.CONDA_CHANNELS }}
192+
conda-remove-defaults: ${{ env.CONDA_REMOVE_DEFAULTS }}
186193

187194
- name: Create MHKiT Conda environment
188195
shell: bash -l {0}
@@ -238,6 +245,8 @@ jobs:
238245
activate-environment: TEST
239246
python-version: ${{ matrix.python-version }}
240247
use-only-tar-bz2: false
248+
channels: ${{ env.CONDA_CHANNELS }}
249+
conda-remove-defaults: ${{ env.CONDA_REMOVE_DEFAULTS }}
241250

242251
- name: Create MHKiT Conda environment
243252
shell: bash -l {0}
@@ -303,6 +312,8 @@ jobs:
303312
activate-environment: TEST
304313
python-version: ${{ matrix.python-version }}
305314
use-only-tar-bz2: false
315+
channels: ${{ env.CONDA_CHANNELS }}
316+
conda-remove-defaults: ${{ env.CONDA_REMOVE_DEFAULTS }}
306317

307318
- name: Create MHKiT Conda environment
308319
shell: bash -l {0}
@@ -433,6 +444,8 @@ jobs:
433444
activate-environment: TEST
434445
python-version: ${{ matrix.python-version }}
435446
use-only-tar-bz2: false
447+
channels: ${{ env.CONDA_CHANNELS }}
448+
conda-remove-defaults: ${{ env.CONDA_REMOVE_DEFAULTS }}
436449

437450
- name: Create MHKiT Conda environment
438451
shell: bash -l {0}
@@ -653,7 +666,8 @@ jobs:
653666
miniconda-version: 'latest'
654667
auto-update-conda: true
655668
python-version: '3.12'
656-
channels: conda-forge
669+
channels: ${{ env.CONDA_CHANNELS }}
670+
conda-remove-defaults: ${{ env.CONDA_REMOVE_DEFAULTS }}
657671
activate-environment: TESTconda
658672
use-only-tar-bz2: false
659673

0 commit comments

Comments
 (0)