diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 931b3bb..c8cb7da 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -47,10 +47,7 @@ jobs: uses: arduino/setup-protoc@v3 - name: Unit testing - run: make protoc && make test - - - name: Build binary - run: make build + run: make test - name: Upload binary uses: actions/upload-artifact@v4 @@ -60,13 +57,6 @@ jobs: compression-level: 9 retention-days: 10 - - name: E2E testing with binary - run: make test-e2e - - - name: Build binary for release - run: make clean && make release - - - name: E2E testing with binary for release - run: make test-e2e - + - name: E2E testing + run: make clean test-e2e diff --git a/Makefile b/Makefile index 4152d06..e8c9873 100644 --- a/Makefile +++ b/Makefile @@ -6,12 +6,13 @@ RESET := \033[0m define print_step @echo "$(GREEN)===== $(1) =====$(RESET)" endef -.PHONY: build -all: protoc build +.PHONY: protoc build release test test-e2e build-for-release + +all: build $(call print_step, Done) -release: protoc build-for-release +release: build-for-release $(call print_step, Done) protoc: @@ -19,28 +20,32 @@ protoc: $(MAKE) -f go.mk protoc $(MAKE) -C ts protoc -test: - $(call print_step, Testing) - $(MAKE) -f go.mk test - $(MAKE) -C ts test - -test-e2e: - $(call print_step, Testing e2e) - $(MAKE) -f go.mk test-e2e - -build: +build: protoc $(call print_step, Building) $(MAKE) -C ts build $(MAKE) copy $(MAKE) -f go.mk build -build-for-release: +build-for-release: protoc $(call print_step, Build for releasing) $(MAKE) -C ts build $(MAKE) copy $(MAKE) zip $(MAKE) -f go.mk build-for-release +test: build + $(call print_step, Testing) + $(MAKE) -f go.mk test + $(MAKE) -C ts test + +test-e2e: build + $(call print_step, Testing e2e) + $(MAKE) -f go.mk test-e2e + $(MAKE) clean + $(MAKE) protoc build-for-release + $(call print_step, Testing e2e again) + $(MAKE) -f go.mk test-e2e + clean: $(call print_step, Cleaning) $(MAKE) -f go.mk clean @@ -51,14 +56,19 @@ clean: fi copy: - $(call print_step, Removing static files from go) + $(call print_step, Removing static files) @if [ -d "./assets/web/html" ]; then \ rm -rf ./assets/web/html; \ fi - $(call print_step, Copying static files to go) + $(call print_step, Copying static files) cp -r ts/out assets/web/html zip: - rm assets/web/html.zip + $(call print_step, Removing zip) + @if [ -d "rm ./assets/web/html.zip" ]; then \ + rm -rf rm ./assets/web/html.zip; \ + fi + + $(call print_step, Copying zip) # this won't work as it creates ts/out entry in the .zip: zip -r assets/web/html.zip ts/out/* cd ts/out && zip -r ../../assets/web/html.zip ./* diff --git a/assets/web/html.zip b/assets/web/html.zip index 61a3c6d..9644b05 100644 Binary files a/assets/web/html.zip and b/assets/web/html.zip differ