diff --git a/.github/workflows/router-ci.yaml b/.github/workflows/router-ci.yaml index d4ea0fda7e..a82581ccfb 100644 --- a/.github/workflows/router-ci.yaml +++ b/.github/workflows/router-ci.yaml @@ -139,12 +139,9 @@ jobs: strategy: fail-fast: false matrix: - test_target: - [ - './. ./fuzzquery ./lifecycle ./modules', - './telemetry', - './events', - ] + make_target: + - integration-tests + - integration-tests-flaky services: nats: image: ghcr.io/wundergraph/cosmo/nats:2.11.0-alpine @@ -222,19 +219,9 @@ jobs: redis-cli -u "redis://cosmo:test@127.0.0.1:$port" ping echo "ACL user 'cosmo' created with full access on port $port" done - - name: Run Integration tests ${{ matrix.test_target }} + - name: Run Integration Tests working-directory: ./router-tests - run: make test test_params="-run '^Test[^(Flaky)]' --timeout=5m -p 1 --parallel 10" test_target="${{ matrix.test_target }}" - - name: Run Flaky Integration tests ${{ matrix.test_target }} - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - max_attempts: 5 - retry_wait_seconds: 5 - retry_on: error - command: | - cd router-tests - make test test_params="-run '^TestFlaky' --timeout=5m --parallel 1" test_target="${{ matrix.test_target }}" + run: make ${{ matrix.make_target }} image_scan: if: github.event.pull_request.head.repo.full_name == github.repository diff --git a/router-tests/Makefile b/router-tests/Makefile index 5974bb03d4..2bace45dc3 100644 --- a/router-tests/Makefile +++ b/router-tests/Makefile @@ -11,7 +11,7 @@ test-deps: $(MAKE) -C ../demo plugin-build-ci test: test-deps - gotestsum -f $(FORMAT) -- -ldflags=-extldflags=-Wl,-ld_classic $(test_params) -race $(test_target) + gotestsum $(gotestsum_params) --packages=$(test_target) -f $(FORMAT) -- -ldflags=-extldflags=-Wl,-ld_classic $(test_params) -race $(test_target) update-snapshot: go test -update -race $(test_target) @@ -44,3 +44,9 @@ update-test-config: bump-deps: ./bump-deps.sh + +integration-tests: + $(MAKE) test test_params="-run '^Test[^(Flaky)]' --timeout=10m" test_target="./..." + +integration-tests-flaky: + $(MAKE) test gotestsum_params="--rerun-fails=5" test_params="-run '^TestFlaky' --timeout=10m -p 1 --parallel 10" test_target="./..." \ No newline at end of file