Skip to content

Perform actual testing against parallel job paths #11

Perform actual testing against parallel job paths

Perform actual testing against parallel job paths #11

Workflow file for this run

on: push
jobs:
main:
runs-on: ubuntu-latest
outputs:
paths: ${{ steps.for-each-4.outputs.paths }}
steps:
- uses: actions/checkout@v3
- name: Run colpal/actions-for-each
id: for-each-1
uses: ./
with:
patterns: 'fixtures/*'
- if: steps.for-each-1.outputs.paths != '["fixtures/function-a/","fixtures/function-b/","fixtures/function-c/","fixtures/run-a/","fixtures/run-b/"]'
run: exit 1
- name: Run colpal/actions-for-each
id: for-each-2
uses: ./
with:
patterns: |
fixtures/*
!fixtures/*-b
- if: steps.for-each-2.outputs.paths != '["fixtures/function-a/","fixtures/function-c/","fixtures/run-a/"]'
run: exit 1
- name: Run colpal/actions-for-each
id: for-each-3
uses: ./
with:
patterns: |
fixtures/**/file.txt
!fixtures/function-*/**
- if: steps.for-each-3.outputs.paths != '["fixtures/run-a/file.txt","fixtures/run-b/file.txt"]'
run: exit 1
- name: Run colpal/actions-for-each
id: for-each-4
uses: ./
with:
patterns: 'fixtures/run-*'
parallel:
needs: main
runs-on: ubuntu-latest
strategy:
matrix:
path: ${{ fromJSON(needs.main.outputs.paths) }}
include:
- path: fixtures/run-a/
value: 4
- path: fixtures/run-b/
value: 5
steps:
- uses: actions/checkout@v3
- run: test "$VALUE" = "$(cat $PATH)"
env:
VALUE: ${{ matrix.value }}
PATH: ${{ matrix.path }}file.txt