name: nf-core AWS test
# This workflow can be triggered manually with the GitHub actions workflow dispatch button.
# It runs the -profile 'test' on AWS batch

on:
  workflow_dispatch:
jobs:
  run-tower:
    name: Run AWS tests
    if: github.repository == 'nf-core/bcellmagic'
    runs-on: ubuntu-latest
    steps:
      - name: Launch workflow via tower
        uses: nf-core/tower-action@master

        with:
          workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
          bearer_token: ${{ secrets.TOWER_BEARER_TOKEN }}
          compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
          pipeline: ${{ github.repository }}
          revision: ${{ github.sha }}
          workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/bcellmagic/work-${{ github.sha }}
          parameters: |
            {
              "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/bcellmagic/results-${{ github.sha }}"
            }
          profiles: '[ "test", "aws_tower" ]'

