Commit a5b297f0 authored by Chris Cheshire's avatar Chris Cheshire
Browse files

Updated CI

parent 5b72325a
Loading
Loading
Loading
Loading
+43 −22
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ jobs:
    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
    runs-on: ubuntu-latest
    env:
      NXF_VER: ${{ matrix.nxf_ver }}
      NXF_ANSI_LOG: false
      CAPSULE_LOG: none
    strategy:
@@ -26,21 +27,13 @@ jobs:
        include:
          # Test pipeline minimum Nextflow version
          - NXF_VER: '21.10.3'
            NXF_EDGE: ''
          # Test pipeline latest Nextflow version
          # Test latest nextflow version
          - NXF_VER: ''
            NXF_EDGE: ''
          # Test latest edge release of Nextflow
          - NXF_VER: ''
            NXF_EDGE: 1
    steps:
      - name: Check out pipeline code
        uses: actions/checkout@v2

      - name: Install Nextflow
        env:
          NXF_VER: ${{ matrix.NXF_VER }}
          NXF_EDGE: ${{ matrix.NXF_EDGE }}
        run: |
          wget -qO- get.nextflow.io | bash
          sudo mv nextflow /usr/local/bin/
@@ -69,28 +62,18 @@ jobs:
    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
    runs-on: ubuntu-latest
    env:
      NXF_VER: ${{ matrix.nxf_ver }}
      NXF_ANSI_LOG: false
      CAPSULE_LOG: none
    strategy:
      matrix:
        # Nextflow versions
        include:
          # Test pipeline minimum Nextflow version
          - NXF_VER: '21.10.3'
            NXF_EDGE: ''
          # Test pipeline latest Nextflow version
          - NXF_VER: ''
            NXF_EDGE: ''
        # Nextflow versions: check pipeline minimum and current latest
        nxf_ver: ['21.10.3', '']
    steps:
      - name: Check out pipeline code
        uses: actions/checkout@v2

      - name: Install Nextflow
        env:
          NXF_VER: ${{ matrix.NXF_VER }}
          # Uncomment only if the edge release is more recent than the latest stable release
          # See https://github.com/nextflow-io/nextflow/issues/2467
          # NXF_EDGE: ${{ matrix.NXF_EDGE }}
        run: |
          wget -qO- get.nextflow.io | bash
          sudo mv nextflow /usr/local/bin/
@@ -110,6 +93,44 @@ jobs:
        run: |
          nextflow run ${GITHUB_WORKSPACE} -profile docker,test_full_small_local_zip

  #####################################
  ### EDGE VERSION INTEGRATION TEST ###
  #####################################
  test_edge:
    name: Run standard pipeline test (edge version)
    # Only run on push if this is the nf-core dev branch (merged PRs)
    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
    runs-on: ubuntu-latest
    env:
      NXF_VER: ''
      NXF_EDGE: 1
      NXF_ANSI_LOG: false
      CAPSULE_LOG: none
    steps:
      - name: Check out pipeline code
        uses: actions/checkout@v2

      - name: Install Nextflow
        run: |
          wget -qO- get.nextflow.io | bash
          sudo mv nextflow /usr/local/bin/
          nextflow self-update

      # Work around for the unexpected end of file error that github actions seems to get when downloading compressed
      # files during pipelie execution
      - name: Download data
        run: |
          wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20.fa.gz
          wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-bowtie2.tar.gz
          wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.gtf.gz
          wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.bed.gz
          wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.fa.gz
          wget -q https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.tar.gz

      - name: Run pipeline with test data
        run: |
          nextflow run ${GITHUB_WORKSPACE} -profile docker,test_local_zip

  ##############################
  ###      UNIT TESTS        ###
  ##############################