From f9c639f994c87022344104ec6999c4e67b597653 Mon Sep 17 00:00:00 2001 From: ssun30 Date: Wed, 9 Oct 2024 15:35:25 -0400 Subject: [PATCH] Added custom condarc that disables default channel --- .github/workflows/CI.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 85a55fe20c..da6d0cc2e8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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: @@ -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 @@ -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 @@ -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 @@ -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