forked from nf-core/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (102 loc) · 4.42 KB
/
create-lint-wf.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Create a pipeline and run nf-core linting
on:
push:
branches:
- dev
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
env:
NXF_ANSI_LOG: false
jobs:
MakeTestWorkflow:
runs-on: ubuntu-latest
env:
NXF_ANSI_LOG: false
strategy:
matrix:
NXF_VER:
- "23.04.0"
- "latest-everything"
steps:
# Get the repo code
- uses: actions/checkout@v3
name: Check out source-code repository
# Set up nf-core/tools
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install .
# Set up Nextflow
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: ${{ matrix.NXF_VER }}
# Install the Prettier linting tools
- uses: actions/setup-node@v3
- name: Install Prettier
run: npm install -g prettier
# Install the editorconfig linting tools
- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
# Build a pipeline from the template
- name: nf-core create
run: nf-core --log-file log.txt create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface" --plain
# Try syncing it before we change anything
- name: nf-core sync
run: nf-core --log-file log.txt sync --dir nf-core-testpipeline/
# Build a module from the template
- name: nf-core modules create
run: nf-core --log-file log.txt modules create bpipe --dir nf-core-testpipeline --author @nf-core-bot --label process_low --meta
# Run code style linting
- name: Run Prettier --check
run: prettier --check nf-core-testpipeline
- name: Run ECLint check
run: editorconfig-checker -exclude README.md $(find nf-core-testpipeline/.* -type f | grep -v '.git\|.py\|md\|json\|yml\|yaml\|html\|css\|work\|.nextflow\|build\|nf_core.egg-info\|log.txt\|Makefile')
# Update modules to the latest version
- name: nf-core modules update
run: nf-core --log-file log.txt modules update --dir nf-core-testpipeline --all --no-preview
# Remove TODO statements
- name: remove TODO
run: find nf-core-testpipeline -type f -exec sed -i '/TODO nf-core:/d' {} \;
# Replace zenodo.XXXXXX to pass readme linting
- name: replace zenodo.XXXXXX
run: find nf-core-testpipeline -type f -exec sed -i 's/zenodo.XXXXXX/zenodo.123456/g' {} \;
# Run nf-core linting
- name: nf-core lint
run: nf-core --log-file log.txt --hide-progress lint --dir nf-core-testpipeline --fail-ignored --fail-warned
# Run the other nf-core commands
- name: nf-core list
run: nf-core --log-file log.txt list
# - name: nf-core licences
# run: nf-core --log-file log.txt licences nf-core-testpipeline
- name: nf-core schema
run: nf-core --log-file log.txt schema build --dir nf-core-testpipeline/ --no-prompts
- name: nf-core bump-version
run: nf-core --log-file log.txt bump-version --dir nf-core-testpipeline/ 1.1
- name: nf-core lint in release mode
run: nf-core --log-file log.txt --hide-progress lint --dir nf-core-testpipeline --fail-ignored --fail-warned --release
- name: nf-core modules install
run: nf-core --log-file log.txt modules install fastqc --dir nf-core-testpipeline/ --force
- name: nf-core modules install gitlab
run: nf-core --log-file log.txt modules --git-remote https://gitlab.com/nf-core/modules-test.git --branch branch-tester install fastp --dir nf-core-testpipeline/
- name: nf-core modules list local
run: nf-core --log-file log.txt modules list local --dir nf-core-testpipeline/
- name: nf-core modules list remote
run: nf-core --log-file log.txt modules list remote
- name: nf-core modules list remote gitlab
run: nf-core --log-file log.txt modules --git-remote https://gitlab.com/nf-core/modules-test.git list remote
- name: Upload log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: nf-core-log-file
path: log.txt