-
Notifications
You must be signed in to change notification settings - Fork 3
113 lines (97 loc) · 3.4 KB
/
tests.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# This file configures the continuous integration (CI) system on GitHub.
# Introductory materials can be found here: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions.
# Documentation for editing this file can be found here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Tests
on:
pull_request:
push:
jobs:
# lint:
# name: Code Quality
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: [ "3.12", "3.10" ]
# steps:
# - uses: actions/checkout@v4
# - name: "Install python"
# uses: "astral-sh/setup-uv@v3"
# with:
# enable-cache: true
# cache-dependency-glob: "pyproject.toml"
# - name: "Run command"
# run: |
# uvx -p ${{ matrix.python-version }} --with tox-uv tox -e ${{ matrix.tox-command }}
generate_suppl_files:
name: Generate extra files
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.8
activate-environment: genome_loader_env
environment-file: env.yml
auto-activate-base: false
- name: Run tests
shell: bash -l {0}
continue-on-error: true
run: |
bash scripts/run_tools.sh tests/data/genome_paths.json test_results
- name: upload artefacts
uses: actions/upload-artifact@v4
with:
path: test_results/
tests:
name: Run tests (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: ["ubuntu-22.02", "ubuntu-24.04"]
# python-version: ["3.10", "3.11", "3.12"]
os: ["ubuntu-24.04"]
python-version: ["3.8"]
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: genome_loader_env
environment-file: env.yml
auto-activate-base: false
- name: install prerequisites
shell: bash -l {0}
run: pip install -r requirements.txt
- name: Run tests
shell: bash -l {0}
continue-on-error: true
run: pytest --cov=genome_loader_scripts --cov-report=xml tests/
- name: Send to Codecov
id: send_to_codecov
continue-on-error: true
uses: codecov/codecov-action@main
with:
files: coverage.xml
# fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run tests
shell: bash -l {0}
continue-on-error: true
run: |
stats.sh --format=8 in=tests/data/FW305-C-112.1/FW305-C-112.1_scaffolds.fna,tests/data/FW305-3-2-15-C-TSA1/FW305-3-2-15-C-TSA1_scaffolds.fna > tests/data/fna-stats.json
checkm2 database --download
mkdir tests/data/checkm2
checkm2 predict --threads 10 --input tests/data/FW305-3-2-15-C-TSA1/FW305-3-2-15-C-TSA1_scaffolds.fna tests/data/FW305-C-112.1/FW305-C-112.1_scaffolds.fna -o tests/data/checkm2
- name: upload artefacts
uses: actions/upload-artifact@v4
with:
path: tests/