-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (61 loc) · 1.75 KB
/
test.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
# Adopted from https://github.com/nf-core/modules/blob/master/.github/workflows/test.yml
name: CI tests
on:
push:
branches:
- dev
pull_request:
# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: "pip"
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files
test:
runs-on: ubuntu-latest
name: Run stub test with docker
env:
NXF_ANSI_LOG: false
steps:
- uses: actions/checkout@v4
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "23.04.4"
- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- name: Run stub-test
run: |
nextflow run \
main.nf \
-profile docker \
-stub \
-params-file tests/stub/params.json
confirm-pass:
runs-on: ubuntu-latest
needs: [pre-commit, test]
if: always()
steps:
- name: All tests ok
if: ${{ success() || !contains(needs.*.result, 'failure') }}
run: exit 0
- name: One or more tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: debug-print
if: always()
run: |
echo "toJSON(needs) = ${{ toJSON(needs) }}"
echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}"