-
Notifications
You must be signed in to change notification settings - Fork 191
92 lines (80 loc) · 2.59 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
name: Create a pipeline and run nf-core linting
on:
push:
branches:
- dev
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
pull_request:
paths-ignore:
- "docs/**"
- "CHANGELOG.md"
release:
types: [published]
workflow_dispatch:
inputs:
runners:
description: "Runners to test on"
type: choice
options:
- "ubuntu-latest"
- "self-hosted"
default: "self-hosted"
# 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: ${{ github.event.inputs.runners || github.run_number > 1 && 'ubuntu-latest' || 'self-hosted' }}
env:
NXF_ANSI_LOG: false
strategy:
matrix:
NXF_VER:
- "23.10.0"
- "latest-everything"
steps:
- name: go to subdirectory and change nextflow workdir
run: |
mkdir -p create-lint-wf
cd create-lint-wf
export NXF_WORK=$(pwd)
# Get the repo code
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
name: Check out source-code repository
# Set up nf-core/tools
- name: Set up Python 3.12
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
with:
python-version: "3.12"
cache: pip
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: run create-lint-wf
uses: ./.github/actions/create-lint-wf
with:
NXF_VER: ${{ matrix.NXF_VER }}
# Build a module from the template
- name: nf-core modules create
run: nf-core --verbose --log-file log.txt modules create bpipe --dir nf-core-testpipeline --author @nf-core-bot --label process_low --meta
working-directory: create-lint-wf
# Remove TODO statements
- name: remove TODO
run: find nf-core-testpipeline -type f -exec sed -i '/TODO nf-core:/d' {} \;
working-directory: create-lint-wf
# Run the other nf-core commands
- name: nf-core pipelines list
run: nf-core --log-file log.txt pipelines list
working-directory: create-lint-wf
- name: nf-core pipelines schema
run: nf-core --log-file log.txt pipelines schema build --dir nf-core-testpipeline/ --no-prompts
working-directory: create-lint-wf
- name: Cleanup work directory
run: sudo rm -rf create-lint-wf
if: always()