From b71d29655d5bb7751a18b061651d2f6525931d82 Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Tue, 16 Apr 2024 11:54:49 +0200 Subject: [PATCH] add test_datasets_single.yaml ci workflow --- .github/workflows/test_datasets_single.yaml | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/test_datasets_single.yaml diff --git a/.github/workflows/test_datasets_single.yaml b/.github/workflows/test_datasets_single.yaml new file mode 100644 index 00000000..0e162f57 --- /dev/null +++ b/.github/workflows/test_datasets_single.yaml @@ -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}} \ No newline at end of file