Skip to content

Commit c2d91a4

Browse files
committed
chatgpt method
1 parent d8cce5b commit c2d91a4

File tree

1 file changed

+20
-26
lines changed

1 file changed

+20
-26
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,30 @@ jobs:
2323
path: .
2424
fetch-depth: 0 # avoid shallow clone with no tags
2525

26-
- name: initialize miniconda
27-
# this uses a marketplace action that sets up miniconda in a way that makes
28-
# it easier to use. I tried setting it up without this and it was a pain
29-
uses: conda-incubator/setup-miniconda@v2
30-
with:
31-
activate-environment: test
32-
# environment.yml file is needed by this action. Because I don't want
33-
# maintain this but rather maintain the requirements files it just has
34-
# basic things in it like conda and pip
35-
environment-file: ./environment.yml
36-
python-version: 3
37-
auto-activate-base: false
26+
- name: Install Mamba
27+
run: |
28+
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh" -O mambaforge.sh
29+
bash mambaforge.sh -b -p $HOME/mambaforge
30+
echo "$HOME/mambaforge/bin" >> $GITHUB_PATH
31+
source $HOME/mambaforge/etc/profile.d/conda.sh
32+
conda init bash
33+
34+
- name: Create conda environment
35+
run: |
36+
source $HOME/mambaforge/etc/profile.d/conda.sh
37+
conda create -n test_env python=3.12 xonsh regolith -c conda-forge -y
38+
conda activate test_env
39+
pip install case_insensitive_dict
3840
39-
- name: install diffpy.pdfgui requirements
40-
shell: bash -l {0}
41+
- name: Install dependencies
4142
run: |
42-
conda config --set always_yes yes --set changeps1 no
43-
conda config --add channels conda-forge
44-
conda activate test
45-
conda install --file requirements/run.txt
46-
conda install --file requirements/test.txt
47-
pip install .
43+
source $HOME/mambaforge/etc/profile.d/conda.sh
44+
conda activate test_env
45+
mamba install --file requirements/run.txt
46+
mamba install --file requirements/test.txt
4847
4948
- name: Use Xvfb Action
5049
uses: GabrielBB/xvfb-action@v1
5150
with:
52-
shell: bash -l {0}
5351
run: |
54-
conda init
55-
conda activate test
56-
coverage run -m pytest -vv -s
57-
coverage report -m
58-
codecov
52+
bash -c "source $HOME/mambaforge/etc/profile.d/conda.sh && conda activate test_env && pytest --maxfail=5 --disable-warnings -v"

0 commit comments

Comments
 (0)