diff --git a/.github/workflows/software-upgrade-test.yml b/.github/workflows/software-upgrade-test.yml index 59b09065b..b6a3f3968 100644 --- a/.github/workflows/software-upgrade-test.yml +++ b/.github/workflows/software-upgrade-test.yml @@ -54,11 +54,11 @@ jobs: - name: Chain initialization run: | cp -a scripts/upgrade-assure/types.go scripts/upgrade-assure-skip/types.go - go run ./scripts/upgrade-assure-skip/... $SNAPSHOT_PATH $OLD_BINARY_PATH $NEW_BINARY_PATH --skip-node-start + GOMEMLIMIT=16GiB go run ./scripts/upgrade-assure-skip/... $SNAPSHOT_PATH $OLD_BINARY_PATH $NEW_BINARY_PATH --skip-node-start - name: Check out new branch run: git checkout ${{ github.head_ref }} - name: Software upgrade run: | - go run ./scripts/upgrade-assure/... $SNAPSHOT_PATH $OLD_BINARY_PATH $NEW_BINARY_PATH --skip-snapshot --skip-chain-init + GOMEMLIMIT=16GiB go run ./scripts/upgrade-assure/... $SNAPSHOT_PATH $OLD_BINARY_PATH $NEW_BINARY_PATH --skip-snapshot --skip-chain-init diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8aed086ff..05a7f2600 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,12 +1,3 @@ -# This workflow file defines a job named test that runs on Ubuntu and is triggered -# on push and pull request events. -# -# The job checks out the repository code, sets up Go with version 1.20, installs -# the project dependencies, and runs the unit tests using `go test`. -# -# The purpose of this workflow file is to automate the process of running unit tests -# for the Elys codebase whenever code changes are pushed or a pull request is opened. - name: Run unit tests on: push @@ -29,4 +20,4 @@ jobs: - name: Run unit tests run: | - go test ./... + make ci-test-unit diff --git a/Makefile b/Makefile index 12f91b651..693ea63fc 100644 --- a/Makefile +++ b/Makefile @@ -95,13 +95,18 @@ test-unit: @echo Running unit tests... @GOFLAGS=$(GOFLAGS) go test -race -failfast -v ./... +## ci-test-unit: Run unit tests +ci-test-unit: + @echo Running unit tests via CI... + @GOFLAGS=$(GOFLAGS) GOMEMLIMIT=16GiB go test -race -cpu=4 -failfast -v ./... + ## clean: Clean build files. Runs `go clean` internally. clean: @echo Cleaning build cache... @rm -rf $(BUILD_FOLDER) 2> /dev/null @go clean ./... -.PHONY: mocks test-unit clean +.PHONY: mocks test-unit ci-test-unit clean ## go-mod-cache: Retrieve the go modules and store them in the local cache go-mod-cache: go.sum