-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
178 lines (175 loc) · 6.25 KB
/
action.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: 'planemo discover'
description: 'Installs planemo and discovers changed repositories of tools or workflows'
author: '[email protected]'
inputs:
mode:
descriptions: 'Mode selector: setup|lint|test|combine|check|deploy'
default: 'setup'
create-cache:
description: 'Set false if creating a cache is not needed'
default: false
planemo-version:
description: 'Set a specific planemo version or url. If not specified installs latest planemo release from PyPI'
default: 'planemo'
galaxy-branch:
description: 'Galaxy branch to use'
default: 'master'
galaxy-fork:
description: 'Galaxy fork to use'
default: 'galaxyproject'
python-version:
description: 'Python version to use'
default: '3.11'
repository-list:
description: 'List of repositories.'
default: ''
tool-list:
description: 'List of tools'
default: ''
chunk-count:
description: 'Number of tests to run in parallel'
default: 20
database-connection:
description: 'Database connection to use for tests'
default: 'postgresql://postgres:postgres@localhost:5432/galaxy'
chunk:
description: 'Current test chunk'
default: 0
max-chunks:
description: 'Maximum number of chunks to use.'
default: 0
html-report:
description: 'Create HTML report?'
default: false
markdown-report:
description: 'Create markdown report?'
default: false
shed-target:
description: 'Which toolshed to target?'
default: 'toolshed'
shed-key:
description: '(Secret!) tool shed api key'
default: 'toolshed'
report-level:
description: "Planemo lint report level"
default: "all"
fail-level:
description: "Planemo lint fail level"
default: 'error'
setup-cvmfs:
description: "Setup CVMFS mount for main.galaxyproject.org and data.galaxyproject.org"
default: false
workflows:
description: "CI for workflows instead of tools"
default: false
workflow-namespace:
description: 'Github namespace under which to create workfow repositories'
default: 'iwc-workflows'
github-token:
description: '(Secret!) Github PAT token. Needed for creating workflow repositories with workflow-upload'
default: ''
additional-planemo-options:
description: 'Additional options passed to planemo in lint/test mode'
default: ''
galaxy-slots:
description: 'Number of cores to be used for Galaxy jobs in planemo test'
default: '1'
test_timeout:
description: 'Maximum runtime of a single test in seconds, default: 0 means unlimited'
default: 86400
# inputs that are needed for testing this action
# not supposed to be used
github-event-name-override:
description: 'ONLY FOR TESTING: override GITHUB_EVENT_NAME'
default: ''
github-ref-override:
description: 'ONLY FOR TESTING: override GITHUB_REF'
default: ''
outputs:
commit-range:
description: 'Commit range'
value: ${{ steps.commit-range.outputs.commit-range }}
repository-list:
description: 'List of repositories'
value: ${{ steps.repository-list.outputs.repository-list }}
tool-list:
description: 'List of tools'
value: ${{ steps.tool-list.outputs.tool-list }}
chunk-count:
description: 'Number of chunks to use'
value: ${{ steps.chunk-count.outputs.chunk-count }}
chunk-list:
description: "List of chunks"
value: ${{ steps.chunk-list.outputs.chunk-list }}
statistics:
description: "Statistics of combined repositories"
value: ${{ steps.statistics.outputs.statistics }}
runs:
using: 'composite'
steps:
# Install the `wheel` package so that when installing other packages which
# are not available as wheels, pip will build a wheel for them, which can be cached.
- name: Install planemo
run: pip install wheel ${{ inputs.planemo-version }}
shell: bash
- name: Install jq
run: sudo apt-get install jq
shell: bash
- name: run planemo actions
run: ${{ github.action_path }}/planemo_ci_actions.sh
shell: bash
env:
EVENT_BEFORE: ${{ github.event.before }}
CREATE_CACHE: ${{ inputs.create-cache }}
GALAXY_BRANCH: ${{ inputs.galaxy-branch }}
GALAXY_FORK: ${{ inputs.galaxy-fork }}
PYTHON_VERSION: ${{ inputs.python-version }}
REPOSITORIES: ${{ inputs.repository-list}}
TOOLS: ${{ inputs.tool-list }}
CHUNK: ${{ inputs.chunk }}
MAX_CHUNKS: ${{ inputs.max-chunks}}
CHUNK_COUNT: ${{ inputs.chunk-count}}
DATABASE_CONNECTION: ${{ inputs.database-connection }}
MODE: ${{ inputs.mode }}
PLANEMO_HTML_REPORT: ${{ inputs.html-report }}
PLANEMO_MD_REPORT: ${{ inputs.markdown-report }}
SHED_TARGET: ${{ inputs.shed-target }}
SHED_KEY: ${{ inputs.shed-key }}
REPORT_LEVEL: ${{ inputs.report-level }}
FAIL_LEVEL: ${{ inputs.fail-level }}
SETUP_CVMFS: ${{ inputs.setup-cvmfs }}
WORKFLOW_NAMESPACE: ${{ inputs.workflow-namespace }}
GITHUB_TOKEN: ${{ inputs.github-token }}
WORKFLOWS: ${{ inputs.workflows }}
GITHUB_EVENT_NAME_OVERRIDE: ${{ inputs.github-event-name-override }}
GITHUB_REF_OVERRIDE: ${{ inputs.github-ref-override }}
ADDITIONAL_PLANEMO_OPTIONS: ${{ inputs.additional-planemo-options }}
GALAXY_SLOTS: ${{ inputs.galaxy-slots }}
TEST_TIMEOUT: ${{ inputs.test_timeout }}
- run: |
echo 'repository-list<<EOF' >> $GITHUB_OUTPUT
echo "$(cat repository_list.txt)" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
id: repository-list
shell: bash
- run: |
echo 'tool-list<<EOF' >> $GITHUB_OUTPUT
echo "$(cat tool_list.txt)" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
id: tool-list
shell: bash
- run: echo "commit-range=$(cat commit_range.txt)" >> $GITHUB_OUTPUT
id: commit-range
shell: bash
- run: echo "chunk-count=$(cat chunk_count.txt)" >> $GITHUB_OUTPUT
id: chunk-count
shell: bash
- run: echo "chunk-list=[$(seq -s ", " 0 $((${{ steps.chunk-count.outputs.chunk-count }} - 1)))]" >> $GITHUB_OUTPUT
id: chunk-list
shell: bash
- run: |
echo 'statistics<<EOF' >> $GITHUB_OUTPUT
echo "$(cat statistics.txt)" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
id: statistics
shell: bash