-
Notifications
You must be signed in to change notification settings - Fork 15
38 lines (35 loc) · 1.09 KB
/
test_conda_env.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Test conda forge env creation
on:
pull_request:
push:
branches:
- main
# Cancel currently running job if a new one comes along for the same branch or tag.
# From https://stackoverflow.com/a/72408109.
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
test-conda-env:
name: Test conda env
runs-on: ubuntu-22.04
container:
image: continuumio/miniconda3
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Create conda env
run: |
conda env create --yes --quiet --file environment.yml
- name: Test conda env
run: |
. "/opt/conda/etc/profile.d/conda.sh"
conda activate vmecpp
conda install --yes --quiet pytest
# exclude test that requires VMEC2000 to be installed:
# it's not available as a conda package
python -m pytest -k 'not test_ensure_vmec2000_input_from_vmecpp_input' tests/