TDR-3326 Assign references to file/directories #2501
Workflow file for this run
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
name: TDR Run API tests | |
on: | |
pull_request: | |
push: | |
branches-ignore: | |
- master | |
- release-* | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sbt scalafmtCheckAll 'graphqlValidateSchema "build" "consignmentApi"' | |
setup-tests: | |
runs-on: ubuntu-latest | |
outputs: | |
files: ${{ steps.generate-files.outputs.files }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: generate-files | |
run: | | |
FILES=$(find src/test/* -name "*Spec.scala" -type f -printf "%f\n" | sed 's/\.[^.]*$//' | jq -R -s -c 'split("\n")[:-1]') | |
echo files=${FILES} >> $GITHUB_OUTPUT | |
test: | |
runs-on: ubuntu-latest | |
needs: setup-tests | |
strategy: | |
matrix: | |
file: ${{ fromJSON(needs.setup-tests.outputs.files) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
docker build -f Dockerfile-tests -t tests . | |
sbt 'testOnly *${{ matrix.file }}*' |