-
Notifications
You must be signed in to change notification settings - Fork 7
82 lines (71 loc) 路 2.8 KB
/
Copy pathtesting.yml
File metadata and controls
82 lines (71 loc) 路 2.8 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
# setup.py's python_requires is ">=3.11" (snakemake>=8's own floor --
# see setup.py's comment on why). This matrix was still 3.9/3.10 despite
# that, which fails `pip install .` outright on both -- confirmed by
# reading setup.py, not run against real CI (no Actions access from
# here). Bumped to match what the package actually supports.
python-version: ["3.11", "3.12"]
steps:
- uses: "actions/checkout@v3"
with:
fetch-depth: 0
# Setup env
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: phables
environment-file: build/environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: "Setup Phables on ${{ matrix.os }} for Python ${{ matrix.python-version }}"
run: |
python -m pip install --upgrade pip
pip install .
- name: "Generate coverage report on ${{ matrix.os }} for Python ${{ matrix.python-version }}"
run: |
# pytest itself + the one real (non-deferred) extra import the test
# suite needs beyond `pip install .`: tests/test_gene_caller.py calls
# into workflow/scripts/gene_caller.py directly (not through a
# Snakemake rule), which needs pyrodigal-gv -- normally supplied at
# real runtime by envs/genecall.yaml, a per-rule conda env this base
# CI install never touches. (format_koverage_results.py's own
# pandas/biopython need is deliberately NOT listed here -- those
# imports were moved inside main() specifically so
# test_format_koverage_results.py doesn't need them at all; adding
# them back here would be masking that, not needing it.)
pip install pytest pytest-cov pyrodigal-gv
pytest --cov=./ --cov-report xml --cov-report lcov --cov-append
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
parallel: true
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.test_number }}
path-to-lcov: "coverage.lcov"
finish:
needs: tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12"]
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true