From f4316480c5f6ad9b71a0fe49a3d50d5fafb487a3 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Sat, 23 Jan 2021 22:55:07 -0600 Subject: [PATCH] ci: Use paths-filter to make one CI test --- .github/filters.yml | 4 ++++ .github/workflows/pytest-workflow.yml | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/filters.yml diff --git a/.github/filters.yml b/.github/filters.yml new file mode 100644 index 00000000..d65430e9 --- /dev/null +++ b/.github/filters.yml @@ -0,0 +1,4 @@ +fastqc: + - software/fastqc/** + - .github/workflows/fastqc.yml + - tests/software/fastqc/** diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 2c7403c2..348322cf 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -2,12 +2,26 @@ name: Pytest-workflow on: [push, pull_request] jobs: + changes: + runs-on: ubuntu-latest + outputs: + # Expose matched filters as job 'modules' output variable + modules: ${{ steps.filter.outputs.changes }} + steps: + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: '.github/filters.yml' + ci_test: runs-on: ubuntu-latest name: CI Test + needs: changes strategy: matrix: nxf_version: [20.11.0-edge] + tags: ${{ fromJson(needs.changes.outputs.modules) }} env: NXF_ANSI_LOG: false steps: @@ -19,5 +33,5 @@ jobs: - name: Nextflow pytest-workflow uses: Emiller88/pytest-workflow-composite-action@master with: - pytest_tags: 'fastqc' + pytest_tags: ${{ matrix.tags }} nxf_version: ${{ matrix.nxf_version }}