Skip to content

Commit 81047fa

Browse files
authored
Enable option to remove 'defaults' which might be implicitly added to conda configuration (#2164)
1 parent 4f12d67 commit 81047fa

File tree

3 files changed

+15
-41
lines changed

3 files changed

+15
-41
lines changed

.github/workflows/build-sphinx.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,12 @@ jobs:
107107
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
108108
with:
109109
miniforge-version: latest
110-
use-mamba: true
110+
use-mamba: 'true'
111111
channels: conda-forge
112+
conda-remove-defaults: 'true'
112113
python-version: ${{ env.python-ver }}
113114
activate-environment: 'docs'
114115

115-
# Here is an issue in conda gh-12356 causing adding defaults to the list of channels
116-
# upon running `conda config --append channels conda-forge`, while mamba requires to have only conda-forge channel
117-
- name: Remove defaults channel
118-
run: |
119-
conda config --remove channels defaults
120-
conda config --show
121-
122116
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
123117
- name: Disable speed limit check in mamba
124118
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV

.github/workflows/conda-package.yml

+11-25
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,12 @@ jobs:
5959
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
6060
with:
6161
miniforge-version: latest
62-
use-mamba: true
62+
use-mamba: 'true'
6363
channels: conda-forge
64+
conda-remove-defaults: 'true'
6465
python-version: ${{ matrix.python }}
6566
activate-environment: 'build'
6667

67-
# Here is an issue in conda gh-12356 causing adding defaults to the list of channels
68-
# upon running `conda config --append channels conda-forge`, while mamba requires to have only conda-forge channel
69-
- name: Remove defaults channel
70-
run: |
71-
conda config --remove channels defaults
72-
conda config --show
73-
7468
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
7569
- name: Disable speed limit check in mamba
7670
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
@@ -154,14 +148,12 @@ jobs:
154148
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
155149
with:
156150
miniforge-version: latest
157-
use-mamba: true
151+
use-mamba: 'true'
158152
channels: conda-forge
153+
conda-remove-defaults: 'true'
159154
python-version: ${{ matrix.python }}
160155
activate-environment: ${{ env.TEST_ENV_NAME }}
161156

162-
- name: Remove defaults channel
163-
run: conda config --remove channels defaults
164-
165157
- name: Install conda-index
166158
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
167159

@@ -283,14 +275,12 @@ jobs:
283275
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
284276
with:
285277
miniforge-version: latest
286-
use-mamba: true
278+
use-mamba: 'true'
287279
channels: conda-forge
280+
conda-remove-defaults: 'true'
288281
python-version: ${{ matrix.python }}
289282
activate-environment: ${{ env.TEST_ENV_NAME }}
290283

291-
- name: Remove defaults channel
292-
run: conda config --remove channels defaults
293-
294284
- name: Store conda paths as envs
295285
run: |
296286
@echo on
@@ -428,14 +418,12 @@ jobs:
428418
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
429419
with:
430420
miniforge-version: latest
431-
use-mamba: true
421+
use-mamba: 'true'
432422
channels: conda-forge
423+
conda-remove-defaults: 'true'
433424
python-version: ${{ matrix.python }}
434425
activate-environment: 'upload'
435426

436-
- name: Remove defaults channel
437-
run: conda config --remove channels defaults
438-
439427
- name: Install anaconda-client
440428
run: mamba install anaconda-client
441429

@@ -467,15 +455,13 @@ jobs:
467455
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
468456
with:
469457
miniforge-version: latest
470-
use-mamba: true
458+
use-mamba: 'true'
471459
channels: conda-forge
472-
run-post: false
460+
conda-remove-defaults: 'true'
461+
run-post: 'false'
473462
python-version: '3.12'
474463
activate-environment: 'cleanup'
475464

476-
- name: Remove defaults channel
477-
run: conda config --remove channels defaults
478-
479465
- name: Install anaconda-client
480466
run: mamba install anaconda-client
481467

.github/workflows/generate_coverage.yaml

+2-8
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,12 @@ jobs:
6565
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
6666
with:
6767
miniforge-version: latest
68-
use-mamba: true
68+
use-mamba: 'true'
6969
channels: conda-forge
70+
conda-remove-defaults: 'true'
7071
python-version: ${{ env.python-ver }}
7172
activate-environment: 'coverage'
7273

73-
# Here is an issue in conda gh-12356 causing adding defaults to the list of channels
74-
# upon running `conda config --append channels conda-forge`, while mamba requires to have only conda-forge channel
75-
- name: Remove defaults channel
76-
run: |
77-
conda config --remove channels defaults
78-
conda config --show
79-
8074
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
8175
- name: Disable speed limit check in mamba
8276
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV

0 commit comments

Comments
 (0)