Skip to content

Commit

Permalink
fix: attempt to run integration test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Sep 12, 2023
1 parent 32680f8 commit b26059d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/actions/go-test-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: extend-tests-timeout
description: add -timeout 10m flag to GOFLAGS to extend timeout for tests

runs:
using: "composite"
steps:
- name: Extend timeout for tests
shell: bash
run: |
echo "GOFLAGS=$GOFLAGS -timeout=10m" >> $GITHUB_ENV
9 changes: 6 additions & 3 deletions internal/integration/ipni_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !race

package integration

import (
Expand All @@ -22,8 +24,9 @@ import (
const rseed = 1234

func TestIpni(t *testing.T) {
if os.Getenv("CI") != "" {
t.Skip("Skipping integration test in CI environment")
// skip if windows, just too slow in CI, maybe revisit this later
if os.Getenv("CI") != "" && os.Getenv("GOOS") == "windows" {
t.Skip("skipping on windows in CI")
}

for _, testCase := range []struct {
Expand All @@ -43,7 +46,7 @@ func TestIpni(t *testing.T) {
t.Run(testCase.name, func(t *testing.T) {
req := require.New(t)

ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()

indexerReady := test.NewIndexerReadyWatcher()
Expand Down

0 comments on commit b26059d

Please sign in to comment.