-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test_datasets_single.yaml ci workflow
- Loading branch information
1 parent
fcb66a0
commit b71d296
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
name: Test Datasets | ||
|
||
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: # 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 */ | jq -R -s -c 'split("\n")[:-1]')" | ||
# Define step output named dir base on ls command transformed to JSON thanks to jq | ||
|
||
loop: | ||
runs-on: ubuntu-latest | ||
needs: [ directories ] # Depends on previous job | ||
strategy: | ||
matrix: | ||
dir: ${{fromJson(needs.directories.outputs.dir)}} # List matrix strategy from directories dynamically | ||
steps: | ||
- run: echo ${{matrix.dir}} |