Skip to content

Commit

Permalink
List tests
Browse files Browse the repository at this point in the history
  • Loading branch information
David Wertenteil committed Feb 20, 2024
1 parent 97599f0 commit 2a13a44
Showing 1 changed file with 18 additions and 29 deletions.
47 changes: 18 additions & 29 deletions .github/workflows/pr-created.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,28 @@ jobs:
GO_VERSION: "1.21"
CGO_ENABLED: 0
secrets: inherit

list-tests:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
env:
CGO_ENABLED: 0
uses: actions/setup-go@v4
with:
go-version: "1.21"

- name: List tests
id: list-tests
run: |
echo "machine github.com login git password ${{ secrets.INGESTERS_READ_TOKEN }}" > ~/.netrc
tests=$(cd tests && go test ./... -list . --tags=integration | grep '^TestSynchronizer' | jq -R -s -c 'split("\n")')
echo "::set-output name=tests::$tests"
echo "Tests: $tests"
matrix=$(echo $tests | jq -c 'split("\n")[:-1]')
echo "::set-output name=matrix::$matrix"
echo "Matrix: $matrix"

component-tests:
needs: list-tests
runs-on: ubuntu-latest
strategy:
matrix:
test: ${{fromJson(needs.list-tests.outputs.matrix)}}
test: [
"TestSynchronizer_TC01_InCluster",
"TestSynchronizer_TC01_Backend",
"TestSynchronizer_TC02_InCluster",
"TestSynchronizer_TC02_Backend",
"TestSynchronizer_TC04_InCluster",
"TestSynchronizer_TC04_Backend",
"TestSynchronizer_TC05_InCluster",
"TestSynchronizer_TC05_Backend",
"TestSynchronizer_TC06",
"TestSynchronizer_TC07",
"TestSynchronizer_TC08",
"TestSynchronizer_TC09",
"TestSynchronizer_TC10",
"TestSynchronizer_TC11",
"TestSynchronizer_TC12"
]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down

0 comments on commit 2a13a44

Please sign in to comment.