name: sarek extra CI
# This workflow is triggered on pushes and PRs to the repository.
on: [push, pull_request]  

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        test: [ANNOTATESNPEFF, GERMLINE, SOMATIC, TARGETED]
        nxf_ver: ['19.04.0', '']
    steps:
      - uses: actions/checkout@v1
      - name: Install Nextflow
        run: |
          export NXF_VER=${{ matrix.nxf_ver }}
          wget -qO- get.nextflow.io | bash
          sudo mv nextflow /usr/local/bin/
      - name: Download image
        run: |
          ${GITHUB_WORKSPACE}/scripts/download_image.sh -n docker --source-version dev --target-version 2.5 --test ${{ matrix.test }}
      - name: Run test
        run: |
          ${GITHUB_WORKSPACE}/scripts/run_tests.sh --test ${{ matrix.test }} --verbose