-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (31 loc) · 1.03 KB
/
python-ci.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
39
40
name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Install Micromamba
run: |
sudo apt-get update
sudo apt-get install -y curl
curl -L https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj -C /usr/local/bin --strip-components=1 bin/micromamba
- name: Create environment
run: |
micromamba create --name test-env -f environment.yaml -y -c conda-forge
env:
MAMBA_ROOT_PREFIX: /usr/local/micromamba
- name: Set up Micromamba environment
run: echo "MICROMAMBA_ROOT_PREFIX=/usr/local/micromamba" >> $GITHUB_ENV
shell: bash
- name: Install dependencies
run: micromamba run -n test-env micromamba install -y -f environment.yaml -c conda-forge
- name: Run tests
run: micromamba run -n test-env pytest