Skip to content

Commit 61d2c85

Browse files
committed
CI.
1 parent 7daf908 commit 61d2c85

5 files changed

Lines changed: 51 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,27 @@ jobs:
170170
- name: Test
171171
uses: ./.github/actions/vmactions
172172

173+
test-wasip1:
174+
runs-on: ubuntu-latest
175+
needs: test
176+
177+
steps:
178+
- uses: bytecodealliance/actions/wasmtime/setup@v1
179+
- uses: actions/checkout@v6
180+
- uses: actions/setup-go@v6
181+
with: { go-version: stable }
182+
183+
- name: Setup
184+
run: echo "$(go env GOROOT)/lib/wasm" >> "$GITHUB_PATH"
185+
186+
- name: Test wasmtime
187+
env:
188+
GOOS: wasip1
189+
GOARCH: wasm
190+
GOWASIRUNTIME: wasmtime
191+
GOWASIRUNTIMEARGS: '--env CI=true --optimize opt-level=0'
192+
run: go test -short -tags sqlite3_dotlk -skip Example ./...
193+
173194
test-qemu:
174195
runs-on: ubuntu-latest
175196
needs: test
@@ -183,9 +204,6 @@ jobs:
183204
- name: Test 386 (32-bit)
184205
run: GOARCH=386 go test ./...
185206

186-
- name: Test riscv64
187-
run: GOARCH=riscv64 go test -short ./...
188-
189207
- name: Test ppc64le
190208
run: GOARCH=ppc64le go test -short ./...
191209

@@ -210,6 +228,18 @@ jobs:
210228
- name: Test arm (32-bit)
211229
run: GOARCH=arm GOARM=7 go test ./...
212230

231+
test-linuxriscv:
232+
runs-on: ubuntu-24.04-riscv
233+
needs: test
234+
235+
steps:
236+
- uses: actions/checkout@v6
237+
- uses: actions/setup-go@v6
238+
with: { go-version: stable }
239+
240+
- name: Test
241+
run: go test ./...
242+
213243
test-macintel:
214244
runs-on: macos-15-intel
215245
needs: test

driver/driver_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"math"
99
"net/url"
1010
"reflect"
11+
"runtime"
1112
"testing"
1213
"time"
1314

@@ -43,6 +44,9 @@ func Test_Open_dir(t *testing.T) {
4344
if err == nil {
4445
t.Fatal("want error")
4546
}
47+
if runtime.GOOS == "js" {
48+
t.Skip("skipping on JS")
49+
}
4650
if !errors.Is(err, sqlite3.CANTOPEN_ISDIR) {
4751
t.Errorf("got %v, want sqlite3.CANTOPEN_ISDIR", err)
4852
}

ext/fileio/write_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build !js
2+
13
package fileio
24

35
import (

ext/serdes/serdes_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ import (
1010
"github.com/ncruces/go-sqlite3"
1111
"github.com/ncruces/go-sqlite3/ext/serdes"
1212
"github.com/ncruces/go-sqlite3/internal/testcfg"
13+
"github.com/ncruces/go-sqlite3/vfs"
1314
)
1415

1516
//go:embed testdata/wal.db
1617
var walDB []byte
1718

1819
func Test_wal(t *testing.T) {
20+
if !vfs.SupportsFileLocking {
21+
t.Skip("skipping without locks")
22+
}
23+
1924
db, err := sqlite3.OpenContext(testcfg.Context(t), "testdata/wal.db")
2025
if err != nil {
2126
t.Fatal(err)

tests/conn_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"errors"
66
"os"
77
"path/filepath"
8+
"runtime"
89
"strings"
910
"testing"
1011
"time"
@@ -21,6 +22,9 @@ func TestConn_Open_dir(t *testing.T) {
2122
if err == nil {
2223
t.Fatal("want error")
2324
}
25+
if runtime.GOOS == "js" {
26+
t.Skip("skipping on JS")
27+
}
2428
if !errors.Is(err, sqlite3.CANTOPEN_ISDIR) {
2529
t.Errorf("got %v, want sqlite3.CANTOPEN_ISDIR", err)
2630
}
@@ -39,6 +43,9 @@ func TestConn_Open_notfound(t *testing.T) {
3943
}
4044

4145
func TestConn_Open_modeof(t *testing.T) {
46+
if runtime.GOOS == "js" {
47+
t.Skip("skipping on JS")
48+
}
4249
t.Parallel()
4350

4451
dir := t.TempDir()

0 commit comments

Comments
 (0)