mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 10:19:54 +00:00
reduced redundant building
This commit is contained in:
13
.github/workflows/affected-tests.yml
vendored
13
.github/workflows/affected-tests.yml
vendored
@@ -27,9 +27,6 @@ jobs:
|
||||
- name: Go Mod Download
|
||||
run: go mod download
|
||||
|
||||
- name: Build e2e binaries
|
||||
run: |
|
||||
make bin/preflight bin/support-bundle
|
||||
|
||||
- name: Compute base ref
|
||||
id: pr-info
|
||||
@@ -159,10 +156,6 @@ jobs:
|
||||
PACKAGES="$pkgs" make test-packages
|
||||
fi
|
||||
|
||||
- name: Build e2e binaries
|
||||
if: matrix.suite != 'unit'
|
||||
run: |
|
||||
make bin/preflight bin/support-bundle
|
||||
|
||||
- name: Run e2e (filtered) - ${{ matrix.suite }}
|
||||
if: matrix.suite != 'unit' && steps.affected_e2e.outputs.has_changes == 'true'
|
||||
@@ -179,7 +172,11 @@ jobs:
|
||||
if [ -s "$file" ]; then
|
||||
regex="$(grep -v '^$' "$file" | tr '\n' '|' | sed 's/|$//')"
|
||||
if [ -n "$regex" ]; then
|
||||
E2EPATHS="$path" RUN="^(${regex})$" make support-bundle-e2e-go-test
|
||||
if [ "${{ matrix.suite }}" = "preflight" ]; then
|
||||
E2EPATHS="$path" RUN="^(${regex})$" make preflight-e2e-go-test
|
||||
else
|
||||
E2EPATHS="$path" RUN="^(${regex})$" make support-bundle-e2e-go-test
|
||||
fi
|
||||
else
|
||||
echo "No valid ${{ matrix.suite }} tests matched after filtering"
|
||||
fi
|
||||
|
||||
10
Makefile
10
Makefile
@@ -84,8 +84,16 @@ run-examples:
|
||||
support-bundle-e2e-test:
|
||||
./test/validate-support-bundle-e2e.sh
|
||||
|
||||
.PHONY: preflight-e2e-go-test
|
||||
preflight-e2e-go-test: bin/preflight
|
||||
if [ -n "$(RUN)" ]; then \
|
||||
go test ${BUILDFLAGS} ${E2EPATHS} -v -run "$(RUN)"; \
|
||||
else \
|
||||
go test ${BUILDFLAGS} ${E2EPATHS} -v; \
|
||||
fi
|
||||
|
||||
.PHONY: support-bundle-e2e-go-test
|
||||
support-bundle-e2e-go-test: bin/preflight bin/support-bundle
|
||||
support-bundle-e2e-go-test: bin/support-bundle
|
||||
if [ -n "$(RUN)" ]; then \
|
||||
go test ${BUILDFLAGS} ${E2EPATHS} -v -run "$(RUN)"; \
|
||||
else \
|
||||
|
||||
Reference in New Issue
Block a user