name: nf-core AWS full size tests
# This workflow is triggered on published releases.
# It can be additionally triggered manually with GitHub actions workflow dispatch button.
# It runs the -profile 'test_full' on AWS batch

on:
  release:
    types: [published]
  workflow_dispatch:
jobs:
  run-tower:
    name: Run AWS full tests
    if: github.repository == 'nf-core/rnaseq'
    runs-on: ubuntu-latest
    # Do a full-scale run with each of the three aligners
    strategy:
      matrix:
        aligner: ["star_salmon", "star_rsem", "hisat2"]
    steps:
      - name: Launch workflow via tower
        uses: nf-core/tower-action@v3
        with:
          workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
          access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
          compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
          workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/rnaseq/work-${{ github.sha }}
          parameters: |
            {
              "outdir" : "s3://${{ secrets.AWS_S3_BUCKET }}/rnaseq/results-${{ github.sha }}/aligner_${{ matrix.aligner }}",
              "aligner": "${{ matrix.aligner }}"
            }
          profiles: test_full,aws_tower
