From 069705ef41176783c3931b16b98ac9555e2d7129 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sat, 2 Sep 2023 18:28:37 -0700 Subject: [PATCH] Move setting of TZ variable into Makefile so it is always set even if doing local development in a different timezone --- .github/workflows/go-test.yml | 5 ----- Makefile | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index aa34ed4..6378fbc 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -54,11 +54,6 @@ jobs: - name: Go test if: ${{ !startsWith(github.event.head_commit.message, 'Release') }} run: | - - # Force the time zone so that test output is consistent - export TZ='America/Los_Angeles' - - # Run the tests make test # - name: Setup tmate session # if: ${{ failure() }} diff --git a/Makefile b/Makefile index 4db33df..22f379a 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ forcetest: go clean -testcache - HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 go test -p 1 -timeout 45m ./... + TZ='America/Los_Angeles' HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 go test -p 1 -timeout 45m ./... test: - HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 go test -p 1 -timeout 45m ./... + TZ='America/Los_Angeles' HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 go test -p 1 -timeout 45m ./... ftest: go clean -testcache - HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 go test -v -p 1 -run "$(FILTER)" ./... + TZ='America/Los_Angeles' HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 go test -v -p 1 -run "$(FILTER)" ./... acttest: act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64