forked from nf-core/sarek
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (103 loc) · 4.41 KB
/
cloudtest.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: nf-core cloud test
on:
release:
types: [created]
workflow_dispatch:
inputs:
test:
description: "-profile test (smaller)"
type: boolean
default: true
somatic:
description: "Somatic full test"
type: boolean
default: false
germline:
description: "Germline full test"
type: boolean
default: false
germline_ncbench_agilent:
description: "Germline Agilent NCBench test"
type: boolean
default: false
aws:
description: "AWS Batch"
type: boolean
default: true
azure:
description: "Azure Batch"
type: boolean
default: true
jobs:
trigger-profile-test:
name: Run AWS tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- profile: test_aws
enabled: ${{ ( github.repository == 'nf-core/sarek' ) && ( github.event_name != 'workflow_dispatch' || ( inputs.test && inputs.aws ) ) }}
- profile: test_azure
enabled: ${{ ( github.repository == 'nf-core/sarek' ) && ( github.event_name != 'workflow_dispatch' || ( inputs.test && inputs.azure ) ) }}
- profile: test_full_aws
enabled: ${{ ( github.repository == 'nf-core/sarek' ) && ( github.event_name != 'workflow_dispatch' || ( inputs.somatic && inputs.aws ) ) }}
- profile: test_full_azure
enabled: ${{ ( github.repository == 'nf-core/sarek' ) && ( github.event_name != 'workflow_dispatch' || ( inputs.somatic && inputs.azure ) ) }}
- profile: test_full_germline_aws
enabled: ${{ ( github.repository == 'nf-core/sarek' ) && ( github.event_name != 'workflow_dispatch' || ( inputs.germline && inputs.aws ) ) }}
- profile: test_full_germline_azure
enabled: ${{ ( github.repository == 'nf-core/sarek' ) && ( github.event_name != 'workflow_dispatch' || ( inputs.germline && inputs.azure ) ) }}
- profile: test_full_germline_ncbench_agilent_aws
enabled: ${{ ( github.repository == 'nf-core/sarek' ) && ( github.event_name != 'workflow_dispatch' || ( inputs.germline_ncbench_agilent && inputs.aws ) ) }}
steps:
# Launch workflow on AWS Batch
- name: AWS Launch
uses: seqeralabs/action-tower-launch@v2
if: ${{ matrix.enabled && ( github.event_name != 'workflow_dispatch' || inputs.aws ) }}
with:
run_name: sarek_${{ matrix.profile }}
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
revision: ${{ github.sha }}
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/sarek/work-${{ github.sha }}/${{ matrix.profile }}
parameters: |
{
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/sarek/results-${{ github.sha }}/${{ matrix.profile }}/"
}
profiles: ${{ matrix.profile }}
- uses: actions/upload-artifact@v3
name: Save AWS Logs
if: success() || failure()
with:
name: tower-aws-${{ matrix.profile }}-log
path: |
tower_action_*.log
tower_action_*.json
# Launch workflow using Tower CLI tool action
- name: Azure Launch
uses: seqeralabs/action-tower-launch@v2
if: ${{ matrix.enabled && ( github.event_name != 'workflow_dispatch' || inputs.azure ) }}
with:
run_name: sarek_${{ matrix.profile }}
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets.TOWER_CE_AZURE_CPU }}
revision: ${{ github.sha }}
workdir: ${{ secrets.TOWER_BUCKET_AZURE}}/sarek/work-${{ github.sha }}/${{ matrix.profile }}
parameters: |
{
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
"outdir": "${{ secrets.TOWER_BUCKET_AZURE }}/sarek/results-${{ github.sha }}/${{ matrix.profile }}/"
}
profiles: ${{ matrix.profile }}
- uses: actions/upload-artifact@v3
name: Save Azure Logs
if: success() || failure()
with:
name: tower-azure-${{ matrix.profile }}-log
path: |
tower_action_*.log
tower_action_*.json