-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (47 loc) · 1.38 KB
/
python-package.yml
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
41
42
43
44
45
46
47
48
49
50
51
## This workflow will install Python dependencies using mamba, run tests and check pre-commit
name: Python package
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 'latest'
init-shell: bash
generate-run-shell: true
environment-name: testenv
environment-file: environment.yaml
- name: pre-commit
uses: pre-commit/action@v3.0.0
- name: Run pytest in micromamba environment
run: |
micromamba install -n testenv pytest
micromamba run -n testenv pytest --import-mode=importlib .
pipeline:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: initialize conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: dropsonde_test
auto-activate-base: false
use-mamba: true
miniforge-variant: Mambaforge
miniforge-version: latest
- name: install conda environment
run:
mamba env update -n dropsonde_test -f environment.yaml
- name: run pydropsonde
run: pydropsonde -c ./dropsonde.cfg