ci: Use paths-filter to make one CI test

This commit is contained in:
Edmund Miller 2021-01-23 22:55:07 -06:00
parent 474a6fad64
commit f4316480c5
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D
2 changed files with 19 additions and 1 deletions

4
.github/filters.yml vendored Normal file
View file

@ -0,0 +1,4 @@
fastqc:
- software/fastqc/**
- .github/workflows/fastqc.yml
- tests/software/fastqc/**

View file

@ -2,12 +2,26 @@ name: Pytest-workflow
on: [push, pull_request] on: [push, pull_request]
jobs: 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: ci_test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: CI Test name: CI Test
needs: changes
strategy: strategy:
matrix: matrix:
nxf_version: [20.11.0-edge] nxf_version: [20.11.0-edge]
tags: ${{ fromJson(needs.changes.outputs.modules) }}
env: env:
NXF_ANSI_LOG: false NXF_ANSI_LOG: false
steps: steps:
@ -19,5 +33,5 @@ jobs:
- name: Nextflow pytest-workflow - name: Nextflow pytest-workflow
uses: Emiller88/pytest-workflow-composite-action@master uses: Emiller88/pytest-workflow-composite-action@master
with: with:
pytest_tags: 'fastqc' pytest_tags: ${{ matrix.tags }}
nxf_version: ${{ matrix.nxf_version }} nxf_version: ${{ matrix.nxf_version }}