generated from bokulich-lab/q2-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (57 loc) · 1.46 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Test and build
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -q ruff
- name: Ruff
uses: chartboost/ruff-action@v1
build-and-test:
needs: lint
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
# necessary for versioneer
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: 'latest'
auto-update-conda: true
python-version: '3.10'
- name: Run tests
# ugly because I wanted to keep one location of dependencies
run: |
python -m pip install --upgrade pip
make create-env
conda activate ritme && make dev && make test-cov
- name: Hack - template coverage output path
run: echo "COV=coverage xml -o $GITHUB_WORKSPACE/coverage.xml" >> $GITHUB_ENV
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true