Skip to content

Commit e14384d

Browse files
committed
run awsfulltest after release, and with dev revision on PRs to master
1 parent f7207a5 commit e14384d

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

nf_core/pipeline-template/.github/workflows/awsfulltest.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@ name: nf-core AWS full size tests
44
# It runs the -profile 'test_full' on AWS batch
55

66
on:
7-
pull_request:
8-
branches:
9-
- main
10-
- master
117
workflow_dispatch:
128
pull_request_review:
139
types: [submitted]
10+
branches:
11+
- main
12+
- master
13+
release:
14+
types: [published]
1415

1516
jobs:
1617
run-platform:
1718
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'
2021
runs-on: ubuntu-latest
2122
steps:
2223
- name: Get PR reviews
@@ -43,6 +44,11 @@ jobs:
4344
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
4445
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required
4546
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+
4652
- name: Launch workflow via Seqera Platform
4753
uses: seqeralabs/action-tower-launch@v2
4854
# TODO nf-core: You can customise AWS full pipeline tests as required
@@ -52,12 +58,12 @@ jobs:
5258
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
5359
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
5460
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 %}
5763
parameters: |
5864
{
5965
"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 %}"
6167
}
6268
profiles: test_full
6369

0 commit comments

Comments
 (0)