-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (56 loc) · 1.73 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
59
60
name: Python CI
on: [ push, pull_request ]
env:
TERM: screen-256color
jobs:
cog_check_job:
runs-on: ubuntu-latest
name: check conventional commit compliance
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# pick the pr HEAD instead of the merge commitonly if it's a PR, otherwise use the default
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Conventional commit check
uses: cocogitto/cocogitto-action@v3
with:
check-latest-tag-only: true
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ 3.8 ]
os: [ ubuntu-latest, macos-latest ]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
channels: conda-forge,bioconda,defaults
channel-priority: strict
activate-environment: tbpore
environment-file: environment.yaml
auto-update-conda: true
- name: Install project
shell: bash -l {0}
run: |
mamba install python=${{ matrix.python-version }}
just install
- name: Check formatting
shell: bash -l {0}
run: just check-fmt
- name: Lint
shell: bash -l {0}
run: just lint
- name: Test and generate coverage report with pytest
shell: bash -l {0}
run: just test-ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}