-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.29 KB
/
test_datasets_single.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Test Dataset
on:
push:
branches: [main]
paths:
- "dataset_builders/**"
- "data/datasets/**"
- "tests/dataset_builders/**"
- "tests/fixtures/dataset_builders/**"
- ".github/workflows/test_datasets_single.yaml"
pull_request:
branches: [main, "release/*"]
paths:
- "dataset_builders/**"
- "data/datasets/**"
- "tests/dataset_builders/**"
- "tests/fixtures/dataset_builders/**"
- ".github/workflows/test_datasets_single.yaml"
jobs:
directories_pie: # Job that list subdirectories
runs-on: ubuntu-latest
outputs:
dir: ${{ steps.set-dirs.outputs.dir }} # generate output name dir by using inner step output
steps:
- uses: actions/checkout@v2
- id: set-dirs # Give it an id to handle to get step outputs in the outputs key above
run: echo "::set-output name=dir::$(ls -d dataset_builders/pie | jq -R -s -c 'split("\n")[:-1]')"
# Define step output named dir base on ls command transformed to JSON thanks to jq
test_pie:
runs-on: ubuntu-latest
needs: [ directories_pie ] # Depends on previous job
strategy:
matrix:
dir: ${{fromJson(needs.directories_pie.outputs.dir)}} # List matrix strategy from directories dynamically
steps:
- run: echo ${{matrix.dir}}