diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e7750c0..779d777 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -103,11 +103,6 @@ jobs: if: ${{ !cancelled() && steps.build.outcome == 'success' }} run: make BUILD=${{ matrix.build }} check - - name: run unit-tests - # always run if build succeeds - if: ${{ !cancelled() && steps.build.outcome == 'success' && runner.os != 'macOS' }} - run: make BUILD=${{ matrix.build }} unittest - - name: run tests # always run if build succeeds if: ${{ !cancelled() && steps.build.outcome == 'success' }} diff --git a/Makefile b/Makefile index 250c0d2..a7bb398 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,19 @@ NGINX_TESTS_DIR ?= $(NGINX_SOURCE_DIR)/tests NGINX_BUILD_DIR ?= $(CURDIR)/objs-$(BUILD) TEST_NGINX_BINARY = $(NGINX_BUILD_DIR)/nginx +TEST_NGINX_GLOBALS += env RUST_BACKTRACE; # "build" always calls cargo and causes relinking. # Clearing this var allows to skip the build step: "make test TEST_PREREQ=" TEST_PREREQ = build + +.PHONY: all + +all: ## Build, lint and test the module +all: build check test + + # Conditionals via include, compatible with most implementations of make # GNU make 3.81 or earlier @@ -35,6 +43,7 @@ MAKE_FLAVOR!= echo posix include build/compat-$(MAKE_FLAVOR).mk include build/build-$(BUILD).mk + # Set up environment propagation BUILD_ENV += NGINX_SOURCE_DIR="$(NGINX_SOURCE_DIR)" @@ -44,12 +53,10 @@ TEST_ENV += RUST_BACKTRACE=1 TEST_ENV += TEST_NGINX_BINARY="$(TEST_NGINX_BINARY)" TEST_ENV += TEST_NGINX_GLOBALS="$(TEST_NGINX_GLOBALS)" -# Build targets -.PHONY: all help build check test clean +# Build targets -all: ## Build, lint and test the module -all: build check unittest test +.PHONY: help build check unittest test clean help: @echo "Available targets:"