Skip to content

Commit

Permalink
chore: build cache fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Oct 6, 2023
1 parent e0edf4e commit aa6dfb9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ jobs:
cache-
- run: make build
- run: cd test && make build
- run: make compress-build
- uses: actions/upload-artifact@v3
with:
name: bin
path: .bin
path: |
.bin/canary-checker
.bin/canary-checker.test
test:
strategy:
fail-fast: false
Expand Down
6 changes: 2 additions & 4 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
NAME=canary-checker
OS = $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH = $(shell uname -m | sed 's/x86_64/amd64/')
KUSTOMIZE=$(PWD)/.bin/kustomize
LDFLAGS=-ldflags "-X \"main.version=$(VERSION_TAG)\""

ifeq ($(VERSION),)
VERSION_TAG=$(shell git describe --abbrev=0 --tags || echo latest)
Expand All @@ -11,5 +9,5 @@ endif

.PHONY: build
build:
go test ./... -o ../.bin/$(NAME).test -ldflags "-X \"main.version=$(VERSION_TAG)\"" main.go
go test ./... -o ../.bin/$(NAME).test -c $(LD_FLAGS) main.go

4 changes: 2 additions & 2 deletions test/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ if [[ "$SKIP_TELEPRESENCE" != "true" ]]; then
telepresence="telepresence --mount false -m vpn-tcp --namespace default --run"
fi

cmd="$telepresence ./test.test -test.v --test-folder $TEST_FOLDER $EXTRA"
cmd="$telepresence $TEST_BINARY -test.v --test-folder $TEST_FOLDER $EXTRA"
echo $cmd
DOCKER_API_VERSION=1.39
set +e -o pipefail
sudo --preserve-env=KUBECONFIG,TEST_FOLDER,DOCKER_API_VERSION,PATH,PING_MODE $cmd 2>&1 | tee $TEST_BINARY
sudo --preserve-env=KUBECONFIG,TEST_FOLDER,DOCKER_API_VERSION,PATH,PING_MODE $cmd 2>&1 | tee test.out
code=$?
echo "return=$code"
sudo chown $USER test.out
Expand Down

0 comments on commit aa6dfb9

Please sign in to comment.