@@ -22,41 +22,61 @@ jobs:
2222 - name : Checkout code
2323 uses : actions/checkout@v3
2424
25- - name : Set up Conda with Mamba
25+ - name : Set up Conda
2626 uses : conda-incubator/setup-miniconda@v2
2727 with :
28- use-mamba : true
28+ use-mamba : false
29+ python-version : 3.11
2930 auto-activate-base : false
3031 miniforge-variant : Miniforge3
3132
33+ - name : Modify environment.yml with matrix Python version (Linux/macOS)
34+ if : runner.os != 'Windows'
35+ run : |
36+ python_version=${{ matrix.python-version }}
37+ sed -i.bak "s/^ - python=.*/ - python=${python_version}/" environment.yml
38+
39+ - name : Modify environment.yml with matrix Python version (Windows)
40+ if : runner.os == 'Windows'
41+ shell : powershell
42+ run : |
43+ $python_version = '${{ matrix.python-version }}'
44+ $file = 'environment.yml'
45+ (Get-Content $file) -replace '^\s+- python=.*', " - python=$python_version" | Set-Content $file
46+
3247 - name : Create environment
3348 run : |
34- mamba env create -f .github/workflows/conda_envs/python${{ matrix.python-version }} .yml
35- mamba run -n plaid_python${{ matrix.python-version }} pip install -e .
49+ conda env create -n plaid-dev -f environment .yml
50+ conda run -n plaid-dev pip install -e .
3651
37- - name : Run tests on Unix
38- if : runner.os != 'Windows '
52+ - name : Run tests on Linux
53+ if : runner.os == 'Linux '
3954 run : |
40- mamba run -n plaid_python${{ matrix.python-version }} pytest tests --cov=src --cov-report=xml --cov-report=term
55+ conda run -n plaid-dev pytest tests --cov=src --cov-report=xml --cov-report=term
56+
57+ - name : Run tests on macOS
58+ if : runner.os == 'macOS'
59+ run : |
60+ conda run -n plaid-dev pytest tests
4161
4262 - name : Run tests on Windows
4363 if : runner.os == 'Windows'
4464 shell : powershell
4565 run : |
46- mamba run -n plaid_python${{ matrix.python-version }} pytest tests
66+ conda run -n plaid-dev pytest tests
4767
4868 - name : Run examples on Unix
4969 if : runner.os != 'Windows'
5070 run : |
5171 cd examples
52- mamba run -n plaid_python${{ matrix.python-version }} bash run_examples.sh
72+ conda run -n plaid-dev bash run_examples.sh
5373
5474 - name : Run examples on Windows
5575 if : runner.os == 'Windows'
5676 shell : powershell
5777 run : |
5878 cd examples
59- mamba run -n plaid_python${{ matrix.python-version }} run_examples.bat
79+ conda run -n plaid-dev run_examples.bat
6080
6181 - name : Upload coverage to Codecov (Linux only)
6282 if : runner.os == 'Linux'
6585 files : coverage.xml
6686 token : ${{ secrets.CODECOV_TOKEN }}
6787 name : python-${{ matrix.python-version }}
68- verbose : true
69-
70- # - name: Set up Miniconda
71- # uses: conda-incubator/setup-miniconda@v2
72- # with:
73- # miniforge-variant: Miniforge3
74- # miniforge-version: latest
75- # use-mamba: true
76- # auto-activate-base: false
77- # auto-update-conda: true
78- # activate-environment: plaid_python${{ matrix.python-version }}
79- # environment-file: .github/workflows/conda_envs/python${{ matrix.python-version }}.yml
88+ verbose : true
0 commit comments