-
Notifications
You must be signed in to change notification settings - Fork 93
98 lines (94 loc) · 3.51 KB
/
Copy pathcloudtest.yml
File metadata and controls
98 lines (94 loc) · 3.51 KB
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: nf-core cloud tests (both full size and smaller)
# This workflow is triggered on PRs opened against the main/master branch.
# It can be additionally triggered manually with GitHub actions workflow dispatch button.
# It runs the -profile 'test_full' on cloud
# or the -profile 'test' on cloud (smaller tests)
on:
workflow_dispatch:
inputs:
test:
description: "-profile test (smaller)"
type: boolean
default: true
aws:
description: "AWS Batch"
type: boolean
default: true
azure:
description: "Azure Batch"
type: boolean
default: true
gcp:
description: "GCP Batch"
type: boolean
default: true
pull_request_review:
types: [submitted]
release:
types: [published]
jobs:
run-platform:
strategy:
fail-fast: false
matrix:
include:
- profile: test_aws
test: test
cloud: aws
compute_env: TOWER_COMPUTE_ENV
workdir: TOWER_BUCKET_AWS
- profile: test_azure
test: test
cloud: azure
compute_env: TOWER_CE_AZURE_CPU
workdir: TOWER_BUCKET_AZURE
- profile: test_gcp
test: test
cloud: gcp
compute_env: TOWER_CE_GCP_CPU
workdir: TOWER_BUCKET_GCP
- profile: test_full_aws
test: test_full
cloud: aws
compute_env: TOWER_COMPUTE_ENV
workdir: TOWER_BUCKET_AWS
- profile: test_full_azure
test: test_full
cloud: azure
compute_env: TOWER_CE_AZURE_CPU
workdir: TOWER_BUCKET_AZURE
- profile: test_full_gcp
test: test_full
cloud: gcp
compute_env: TOWER_CE_GCP_CPU
workdir: TOWER_BUCKET_GCP
name: Run cloud tests
# run only if the PR is approved by at least 2 reviewers and against the master/main branch or manually triggered
if: github.repository == 'nf-core/fetchngs' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch' || github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Set revision variable
id: revision
run: |
echo "revision=${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'release') && github.sha || 'dev' }}" >> "$GITHUB_OUTPUT"
- name: Launch workflow via Seqera Platform
uses: seqeralabs/action-tower-launch@v2
with:
run_name: fetchngs_${{ matrix.profile }}
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets[matrix.compute_env] }}
revision: ${{ steps.revision.outputs.revision }}
workdir: ${{ secrets[matrix.workdir] }}/work/fetchngs/work-${{ steps.revision.outputs.revision }}/${{ matrix.profile }}
parameters: |
{
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
"outdir": "${{ secrets[matrix.workdir] }}/fetchngs/results-${{ steps.revision.outputs.revision }}/${{ matrix.profile }}/"
}
profiles: ${{ matrix.profile }}
- uses: actions/upload-artifact@v4
with:
name: Seqera Platform debug log file
path: |
seqera_platform_action_*.log
seqera_platform_action_*.json