@@ -4,19 +4,20 @@ name: nf-core AWS full size tests
4
4
# It runs the -profile 'test_full' on AWS batch
5
5
6
6
on :
7
- pull_request :
8
- branches :
9
- - main
10
- - master
11
7
workflow_dispatch :
12
8
pull_request_review :
13
9
types : [submitted]
10
+ branches :
11
+ - main
12
+ - master
13
+ release :
14
+ types : [published]
14
15
15
16
jobs :
16
17
run-platform :
17
18
name : Run AWS full tests
18
- # run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered
19
- if : github.repository == '{{ name }}' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch'
19
+ # run only if the PR is approved by at least 2 reviewers and against the master/main branch or manually triggered
20
+ if : github.repository == '{{ name }}' && github.event.review.state == 'approved' && ( github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch'
20
21
runs-on : ubuntu-latest
21
22
steps :
22
23
- name : Get PR reviews
43
44
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
44
45
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required
45
46
47
+ - name : Set revision variable
48
+ id : revision
49
+ run : |
50
+ echo "revision=${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'release') && github.sha || 'dev' }}" >> "$GITHUB_OUTPUT"
51
+
46
52
- name : Launch workflow via Seqera Platform
47
53
uses : seqeralabs/action-tower-launch@v2
48
54
# TODO nf-core: You can customise AWS full pipeline tests as required
@@ -52,12 +58,12 @@ jobs:
52
58
workspace_id : ${{ secrets.TOWER_WORKSPACE_ID }}
53
59
access_token : ${{ secrets.TOWER_ACCESS_TOKEN }}
54
60
compute_env : ${{ secrets.TOWER_COMPUTE_ENV }}
55
- revision : ${{ github.sha }}
56
- workdir : s3://${{ secrets.AWS_S3_BUCKET }}{% endraw %}/work/{{ short_name }}/{% raw %}work-${{ github.sha }}{% endraw %}
61
+ revision : ${{ steps.revision.outputs.revision }}
62
+ workdir : s3://${{ secrets.AWS_S3_BUCKET }}{% endraw %}/work/{{ short_name }}/{% raw %}work-${{ steps.revision.outputs.revision }}{% endraw %}
57
63
parameters : |
58
64
{
59
65
"hook_url": "{% raw %}${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}{% endraw %}",
60
- "outdir": "s3://{% raw %}${{ secrets.AWS_S3_BUCKET }}{% endraw %}/{{ short_name }}/{% raw %}results-${{ github.sha }}{% endraw %}"
66
+ "outdir": "s3://{% raw %}${{ secrets.AWS_S3_BUCKET }}{% endraw %}/{{ short_name }}/{% raw %}results-${{ steps.revision.outputs.revision }}{% endraw %}"
61
67
}
62
68
profiles : test_full
63
69
0 commit comments