From dd4b1c1eb899f83256d9f4818af7d40e51fde494 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Fri, 6 Oct 2023 17:03:28 -0400
Subject: [PATCH] ci: add new workflow for make test-short (backport #2367)
(#2379)
This is an automatic backport of pull request #2367 done by
[Mergify](https://mergify.com).
---
Mergify commands and options
More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).
You can also trigger Mergify actions by commenting on this pull request:
- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport ` will backport this PR on
`` branch
Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:
- look at your merge queues
- generate the Mergify configuration with the config editor.
Finally, you can contact us on https://mergify.com
---------
Co-authored-by: Tung Bui (Leo)
Co-authored-by: Rootul P
---
.github/workflows/test.yml | 13 +++++++++++++
Makefile | 2 +-
test/txsim/run_test.go | 3 +++
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 8c2ea3a62b..0fa0484a58 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -6,6 +6,19 @@ env:
GO_VERSION: '1.21.1'
jobs:
+ test-short:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-go@v4
+ with:
+ go-version: ${{ env.GO_VERSION }}
+
+ - name: Run tests in short mode
+ run: make test-short
+ timeout-minutes: 10
+
test:
runs-on: ubuntu-latest
steps:
diff --git a/Makefile b/Makefile
index 5ce6fa5549..895ec7af9c 100644
--- a/Makefile
+++ b/Makefile
@@ -105,7 +105,7 @@ test:
## test-short: Run unit tests in short mode.
test-short:
@echo "--> Running tests in short mode"
- @go test ./... -short
+ @go test ./... -short -timeout 1m
.PHONY: test-short
## test-race: Run unit tests in race mode.
diff --git a/test/txsim/run_test.go b/test/txsim/run_test.go
index 2a289c6f7d..b56a57f358 100644
--- a/test/txsim/run_test.go
+++ b/test/txsim/run_test.go
@@ -23,6 +23,9 @@ import (
)
func TestTxSimulator(t *testing.T) {
+ if testing.Short() {
+ t.Skip("skipping TestTxSimulator in short mode.")
+ }
testCases := []struct {
name string
sequences []txsim.Sequence