-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (94 loc) · 3.46 KB
/
Nextflow_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
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
name: Nextflow tests
# This workflow runs the PhyloNext pipeline with the minimal test dataset to check that it completes without any syntax errors
on:
push:
branches:
- main
pull_request:
release:
types: [published]
# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run PhyloNext pipeline with test data
if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'vmikk/PhyloNext') }}
runs-on: ubuntu-latest
strategy:
matrix:
# Nextflow versions
include:
# Test pipeline minimum Nextflow version
- NXF_VER: '23.10.0'
NXF_EDGE: ''
# # Test latest edge release of Nextflow
# - NXF_VER: ''
# NXF_EDGE: '1'
env:
NXF_ANSI_LOG: false
# CAPSULE_LOG: none
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
with:
ref: main
fetch-depth: 1
# pwd = /__w/PhyloNext/PhyloNext
- name: Install Nextflow
env:
NXF_VER: ${{ matrix.NXF_VER }}
# Uncomment only if the edge release is more recent than the latest stable release
# See https://github.com/nextflow-io/nextflow/issues/2467
# NXF_EDGE: ${{ matrix.NXF_EDGE }}
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Run pipeline usning built-in phylogenetic tree
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker -work-dir $(pwd)/work1
- name: Output log on failure
if: failure()
run: |
sudo apt install bat > /dev/null
batcat --decorations=always --color=always /home/runner/work/PhyloNext/PhyloNext/.nextflow.log
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: logs-builtin-tree
path: |
/home/runner/work/PhyloNext/PhyloNext/.nextflow.log
/home/runner/work/PhyloNext/PhyloNext/work1/**/.command.log
- name: Run pipeline and fetch phylogenetic tree from OToL
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_ott,docker --maxage 111 -work-dir $(pwd)/work2 -resume
- name: Output log on failure
if: failure()
run: |
sudo apt install bat > /dev/null
batcat --decorations=always --color=always /home/runner/work/PhyloNext/PhyloNext/.nextflow.log
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: logs-ott-tree
path: |
/home/runner/work/PhyloNext/PhyloNext/.nextflow.log
/home/runner/work/PhyloNext/PhyloNext/work2/**/.command.log
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v2
with:
files: "./03.Plots/Biodiverse_results_merged.txt, ./03.Plots/Choropleth.html, ./03.Plots/Diversity_estimates.gpkg"
- name: File exists
if: steps.check_files.outputs.files_exists == 'true'
run: |
echo "Looks good, all expected output files are in place!"
exit 0
- name: File is missing
if: steps.check_files.outputs.files_exists == 'false'
run: |
echo "ERROR! Some files are missing!"
exit 1