Skip to content

Commit

Permalink
Compute list of modules for testing automatically (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianrgreco authored Jan 16, 2024
1 parent 0129a82 commit 1cc2b41
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand All @@ -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 }}
Expand Down

0 comments on commit 1cc2b41

Please sign in to comment.