forked from galaxyproject/iwc
-
Notifications
You must be signed in to change notification settings - Fork 8
98 lines (98 loc) · 2.78 KB
/
test_workflows.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
name: Test Galaxy workflows
on:
workflow_call:
inputs:
galaxy-head-sha:
description: 'hash of the latest commit in the Galaxy repo'
required: true
type: string
chunk-count:
description: 'number of tests to run in parallel'
default: 1
required: false
type: number
chunk-list:
description: 'stringified JSON array of chunk IDs'
default: "[0]"
required: false
type: string
python-version-list:
description: 'stringified JSON array of Python versions'
default: "[\"3.11\"]"
required: false
type: string
repository-list:
description: 'list of repositories to test'
default: ''
required: false
type: string
galaxy-fork:
description: 'Galaxy fork to use'
default: galaxyproject
required: false
type: string
galaxy-branch:
description: 'Galaxy branch to use'
default: master
required: false
type: string
check-outputs:
description: 'if true, check if any workflow test failed'
default: false
required: false
type: boolean
jobs:
test:
name: Test workflows
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chunk: ${{ fromJson(inputs.chunk-list) }}
python-version: ${{ fromJson(inputs.python-version-list) }}
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v4
id: cache-pip
with:
path: ~/.cache/pip
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ inputs.galaxy-head-sha }}
- name: Free Disk Space (Ubuntu)
uses: insightsengineering/disk-space-reclaimer@v1
- name: Planemo test workflows
uses: galaxyproject/planemo-ci-action@v1
id: test-workflows
with:
mode: test
workflows: true
setup-cvmfs: true
repository-list: ${{ inputs.repository-list }}
galaxy-fork: ${{ inputs.galaxy-fork }}
galaxy-branch: ${{ inputs.galaxy-branch }}
chunk: ${{ matrix.chunk }}
chunk-count: ${{ inputs.chunk-count }}
- uses: actions/upload-artifact@v4
with:
name: 'Workflow test output ${{ matrix.chunk }}'
path: upload
- name: Check outputs
if: inputs.check-outputs
uses: galaxyproject/planemo-ci-action@v1
id: check
with:
mode: check