ci: Cut out the middle man

This commit is contained in:
Edmund Miller 2021-03-25 13:56:40 -05:00
parent c4606991ae
commit f2825f7f02
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D

View file

@ -8,7 +8,7 @@ jobs:
outputs:
# Expose matched filters as job 'modules' output variable
modules: ${{ steps.filter.outputs.changes }}
proceed: ${{ steps.less_than.outputs.proceed }}
proceed: ${{ steps.yq_modules.outputs.proceed }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
@ -16,17 +16,14 @@ jobs:
with:
filters: 'tests/config/pytest_software.yml'
# 256 max jobs / 2 nxf versions / 3 profiles
- uses: mikefarah/yq@v4.6.3
name: Install yq
name: Fail if number of modules to be tested is greater than 42
id: yq_modules
with:
cmd: |
output=$(echo ${{ steps.filter.outputs.changes }} | yq e 'length' -)
echo "::set-output name=magic_number::$output"
# 256 max jobs / 2 nxf versions / 3 profiles
- name: Fail if number of modules to be tested is greater than 42
id: less_than
run: echo "::set-output name=proceed::$(test ${{ steps.yq_modules.outputs.magic_number }} -lt 42 )"
echo "::set-output name=proceed::$(if (test $output -lt 42); then echo 0; fi)"