-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (40 loc) · 1.43 KB
/
test.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
name: Test
on: [push, pull_request]
jobs:
cli_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
cache-downloads: true
environment-file: env.yaml
- name: Conda list
shell: bash -l {0}
run: conda list
- name: Run tests
shell: bash -l {0}
run: |
set -ex
python -m pip install . --no-deps -vv
check_exit_code () { exit_code=$?; echo "exit code: $exit_code"; if [ $exit_code -ne 0 ]; then exit 1; fi; }
itolparser --version
check_exit_code
itolparser --continuous nr_amr_genes --outdir tmp_output --input tests/table.tsv
check_exit_code
for file in tests/correct_output/normal/*
do
NAME=$(basename $file)
cmp tests/correct_output/normal/$NAME tmp_output/$NAME
check_exit_code
done
itolparser --continuous nr_amr_genes --ignore ST serotype --outdir tmp_output_OrRd --palette OrRd -i tests/table.tsv
check_exit_code
for file in tests/correct_output/OrRd_palette/*
do
NAME=$(basename $file)
cmp tests/correct_output/OrRd_palette/$NAME tmp_output_OrRd/$NAME
check_exit_code
done