diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml new file mode 100644 index 00000000..445a0a23 --- /dev/null +++ b/.github/workflows/javascript-tests.yml @@ -0,0 +1,30 @@ +on: [push] + +jobs: + list-projects: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.build-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v2 + - id: build-mastrix + run: echo "::set-output name=matrix::$(ls javascript/ | jq -Rsc 'split("\n")[:-1]')" + + test-javascript: + needs: list-projects + runs-on: ubuntu-latest + strategy: + matrix: + project: ${{ fromJson(needs.list-projects.outputs.matrix) }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: '20.4.0' + - name: Run tests + run: | + set -exuo pipefail + npm install + npm run test + with: + working-directory: "javascript/${{ matrix.project }}" \ No newline at end of file