From 68651c429530f529bed78a95a0db0d08aed08b31 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Wed, 4 Dec 2024 11:50:44 +0800 Subject: [PATCH] simplify venv preparation --- .github/workflows/test.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b99a03c..e11db49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,6 @@ permissions: jobs: test: - defaults: - run: - shell: bash -l {0} # enables conda/mamba env activation by reading bash profile strategy: fail-fast: false matrix: @@ -33,11 +30,19 @@ jobs: - name: Set up micromamba uses: mamba-org/setup-micromamba@main - - - name: Create mamba environment - run: | - micromamba create -n venv python=${{ matrix.python-version }} --yes - micromamba install -n venv -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes + with: + environment-name: matgenb + init-shell: bash # TODO: is this needed? (might be default) + condarc: | + channels: + - conda-forge + create-args: >- + python=${{ matrix.python-version }} + enumlib + packmol + bader + openbabel + openff-toolkit - name: Install uv uses: astral-sh/setup-uv@v4 @@ -46,11 +51,11 @@ jobs: - name: Install dependencies run: | - micromamba activate venv + # micromamba activate matgenb uv pip install --upgrade -r requirements-ci.txt - - name: pytest + - name: Run pytest run: | - micromamba activate venv + # micromamba activate matgenb cd notebooks pytest --ignore-glob=*notest.ipynb --nbmake .