Skip to content

Commit

Permalink
Added custom condarc that disables default channel
Browse files Browse the repository at this point in the history
  • Loading branch information
ssun30 committed Oct 10, 2024
1 parent 74ef5e6 commit f9c639f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ on:
- cron: "0 8 * * *"
# runs on all branches on both RMG-Py and forks
push:
branches:
- miniforge_action_test
# runs on PRs against RMG-Py (and anywhere else, but we add this for RMG-Py)
pull_request:

Expand Down Expand Up @@ -62,6 +64,16 @@ jobs:
- name: Checkout RMG-Py
uses: actions/checkout@v4

# Step to create a custom condarc.yml before setting up conda
- name: Create custom condarc.yml
run: |
RUNNER_CWD=$(pwd)
echo "channels:" > $RUNNER_CWD/condarc.yml
echo " - conda-forge" >> $RUNNER_CWD/condarc.yml
echo " - rmg" >> $RUNNER_CWD/condarc.yml
echo " - cantera" >> $RUNNER_CWD/condarc.yml
echo "show_channel_urls: true" >> $RUNNER_CWD/condarc.yml
# configures the mamba environment manager and builds the environment
- name: Setup Miniforge Python 3.7
uses: conda-incubator/setup-miniconda@v3
Expand All @@ -70,6 +82,7 @@ jobs:
miniforge-variant: Miniforge3
miniforge-version: latest
python-version: 3.7
condarc-file: condarc.yml
activate-environment: rmg_env
use-mamba: true

Expand Down Expand Up @@ -112,6 +125,16 @@ jobs:
- name: Checkout RMG-Py
uses: actions/checkout@v4

# Step to create a custom condarc.yml before setting up conda
- name: Create custom condarc.yml
run: |
RUNNER_CWD=$(pwd)
echo "channels:" > $RUNNER_CWD/condarc.yml
echo " - conda-forge" >> $RUNNER_CWD/condarc.yml
echo " - rmg" >> $RUNNER_CWD/condarc.yml
echo " - cantera" >> $RUNNER_CWD/condarc.yml
echo "show_channel_urls: true" >> $RUNNER_CWD/condarc.yml
# configures the mamba environment manager and builds the environment
- name: Setup Miniforge Python 3.7
uses: conda-incubator/setup-miniconda@v3
Expand All @@ -120,6 +143,7 @@ jobs:
miniforge-variant: Miniforge3
miniforge-version: latest
python-version: 3.7
condarc-file: condarc.yml
activate-environment: rmg_env
use-mamba: true

Expand Down

0 comments on commit f9c639f

Please sign in to comment.