Skip to content

Add 'conda-remove-defaults' setting and support 'nodefaults' as a keyword channel #2

Add 'conda-remove-defaults' setting and support 'nodefaults' as a keyword channel

Add 'conda-remove-defaults' setting and support 'nodefaults' as a keyword channel #2

Workflow file for this run

name: "Example 14: Remove implicitly added channels"
on:
pull_request:
branches:
- "*"
push:
branches:
- "develop"
- "main"
- "master"
schedule:
# Note that cronjobs run on master/main by default
- cron: "0 0 * * *"
concurrency:
group:
${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
example-14:
# prevent cronjobs from running on forks
if:
(github.event_name == 'schedule' && github.repository ==
'conda-incubator/setup-miniconda') || (github.event_name != 'schedule')
name: Ex14 (${{ matrix.os }}, ${{ matrix.no-implicit-channels }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
no-implicit-channels: [true, false]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./
id: setup-miniconda
continue-on-error: true
with:
channels: conda-forge
python-version: "3.12"
no-implicit-channels: ${{ matrix.no-implicit-channels }}
- shell: bash -el {0}
run: |
channels=$(conda config --show channels --json | jq -r '.channels | join(",")')
echo $channels
if [[ "${{ matrix.no-implicit-channels }}" == "true" ]]; then
if [[ "$channels" != "conda-forge" ]]; then
exit 1
fi
elif [[ "$channels" != "conda-forge,defaults" ]]; then
exit 1
fi