-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (54 loc) · 1.54 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI
on:
pull_request:
workflow_dispatch: # allows you to trigger manually
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-ci-trigger:
name: detect ci trigger
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'pull_request'
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1.1
id: detect-trigger
with:
keyword: "[skip-ci]"
test: # Runs testing suite with minimal dependencies
name: pytest
runs-on: ubuntu-latest
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
channels: conda-forge
mamba-version: '*'
activate-environment: test-env
python-version: 3.8
- name: Set up conda environment
run: |
mamba env update -f environment.yml
- name: Conda info
run: conda info
- name: Conda list
run: conda list
- name: install car-referencer
run: |
python setup.py develop
- name: Run tests
run: py.test