Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Skip a few more tests
  • Loading branch information
kyleconroy committed Dec 5, 2023
commit 5af50461a8d981d4f9d11536bd6aed01d25f3ae3
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
exclude:
- isMain: false
include:
- os: windows-latest
- os: ubuntu-latest
cgo: '1'
- os: ubuntu-latest
cgo: '0'
# - os: ubuntu-latest
# cgo: '0'
name: test ${{ matrix.os }} cgo=${{ matrix.cgo }}
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
CGO_ENABLED: ${{ matrix.cgo }}

- name: test ./...
run: gotestsum --junitfile junit.xml -- -timeout 20m ./...
run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./...
env:
CI_SQLC_PROJECT_ID: ${{ secrets.CI_SQLC_PROJECT_ID }}
CI_SQLC_AUTH_TOKEN: ${{ secrets.CI_SQLC_AUTH_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion internal/endtoend/ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"os"
"path/filepath"
"runtime"
"slices"
"strings"
"testing"
Expand All @@ -19,7 +20,9 @@ import (
)

func TestValidSchema(t *testing.T) {
t.Skip("ignore")
if os.Getenv("CI") != "" && runtime.GOOS != "linux" {
t.Skipf("only run these tests in CI on linux: %s %s", os.Getenv("CI"), runtime.GOOS)
}

ctx := context.Background()

Expand Down
11 changes: 9 additions & 2 deletions internal/endtoend/endtoend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,15 @@ func TestReplay(t *testing.T) {
}
},
Enabled: func() bool {
return false
// return len(os.Getenv("SQLC_AUTH_TOKEN")) > 0
// Return false if no auth token exists
if len(os.Getenv("SQLC_AUTH_TOKEN")) == 0 {
return false
}
// In CI, only run these tests from Linux
if os.Getenv("CI") != "" {
return runtime.GOOS == "linux"
}
return true
},
},
}
Expand Down