-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (39 loc) · 1.31 KB
/
pr_and_main.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
name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true # cancel jobs from previous push
jobs:
tests:
name: tests ${{ matrix.variant.os }}, py${{ matrix.variant.python-version }}
runs-on: ${{ matrix.variant.os }}
defaults:
run:
shell: bash -l {0} # required for conda env
strategy:
fail-fast: false
matrix:
variant:
- {os: ubuntu-20.04, python-version: "3.10", build-config: ci-linux}
- {os: macos-11, python-version: "3.10", build-config: ci-macos}
- {os: windows-2019, python-version: "3.10", build-config: ci-windows}
- {os: ubuntu-20.04, python-version: "3.9", build-config: ci-linux-39}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup conda environment
uses: mamba-org/provision-with-micromamba@main
with:
micromamba-version: 1.0.0
environment-file: .buildconfig/${{ matrix.variant.build-config }}.yml
cache-env: true
extra-specs: |
python=${{ matrix.variant.python-version }}
conda-build
- run: conda develop src
- run: python -m pytest