From 1cc2b41153c6c36960290be5b2e494c314ff62d5 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Tue, 16 Jan 2024 16:21:39 +0000 Subject: [PATCH] Compute list of modules for testing automatically (#707) --- .github/workflows/test.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 11dfbab09..06ada7bcf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,9 +65,20 @@ jobs: container-runtime: ${{ matrix.container-runtime }} workspace: packages/testcontainers + list-modules: + name: List modules + runs-on: ubuntu-22.04 + needs: test-testcontainers + outputs: + modules: ${{ steps.list_modules.outputs.modules }} + steps: + - uses: actions/checkout@v2 + - id: list_modules + run: echo "modules=$(ls packages/modules | jq -cnR '[inputs | select(length>0)]'))" >> $GITHUB_OUTPUT + test-modules: name: Module (${{ matrix.module }}) - needs: test-testcontainers + needs: [ test-testcontainers, list-modules ] strategy: matrix: node-version: [ 18.x, 20.x ] @@ -79,20 +90,7 @@ jobs: runner: ubuntu-22.04 - container-runtime: podman runner: ubuntu-22.04 - module: - - arangodb - - elasticsearch - - hivemq - - kafka - - localstack - - mongodb - - mssqlserver - - mysql - - nats - - neo4j - - postgresql - - redis - - selenium + module: ${{ fromJson(needs.list-modules.outputs.modules) }} uses: ./.github/workflows/test-template.yml with: runner: ${{ matrix.runner }}