Test more.

This commit is contained in:
Nuno Cruces
2024-11-12 14:14:45 +00:00
parent a2253558ef
commit 81dd786af7
4 changed files with 58 additions and 48 deletions

12
.github/actions/vmactions/template.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
name: VM Actions matrix
description: VM Actions matrix template
runs:
using: "composite"
steps:
- name: Test
uses: ${VMACTIONS}
with:
usesh: true
copyback: false
run: . ./test.sh

View File

@@ -8,4 +8,8 @@ for p in $(go list ./...); do
name="$(basename "$p").test"
(cd ${dir}; go test -c ${BUILDFLAGS:-})
[ -f "${dir}/${name}" ] && echo "(cd ${dir}; ./${name} ${TESTFLAGS:-})" >> test.sh
done
done
if [[ -v VMACTIONS ]]; then
envsubst < .github/actions/vmactions/template.yml > .github/actions/vmactions/action.yml
fi

View File

@@ -83,21 +83,6 @@ jobs:
github.event_name == 'push' &&
matrix.os == 'ubuntu-latest'
test-intel:
runs-on: macos-13
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: stable }
- name: Git LFS pull
uses: ./.github/actions/lfs
- name: Test
run: go test -v ./...
test-bsd:
strategy:
matrix:
@@ -116,8 +101,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: stable }
- name: Git LFS pull
uses: ./.github/actions/lfs
@@ -137,6 +120,42 @@ jobs:
run: . ./test.sh
sync_files: runner-to-vm
test-vm:
strategy:
matrix:
os:
- name: dragonfly
action: 'vmactions/dragonflybsd-vm@v1'
flags: '-test.v -test.short'
- name: illumos
action: 'vmactions/omnios-vm@v1'
flags: '-test.v -test.short'
- name: solaris
action: 'vmactions/solaris-vm@v1'
flags: '-test.v -test.short'
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Git LFS pull
uses: ./.github/actions/lfs
- name: Build
env:
GOOS: ${{ matrix.os.name }}
TESTFLAGS: ${{ matrix.os.flags }}
VMACTIONS: ${{ matrix.os.action }}
run: .github/workflows/build-test.sh
- name: Test
uses: ./.github/actions/vmactions
with:
usesh: true
copyback: false
run: . ./test.sh
test-qemu:
runs-on: ubuntu-latest
needs: test
@@ -165,8 +184,8 @@ jobs:
- name: Test s390x (big-endian)
run: GOARCH=s390x go test -v -short -tags sqlite3_dotlk ./...
test-vm:
runs-on: ubuntu-latest
test-macintel:
runs-on: macos-13
needs: test
steps:
@@ -177,30 +196,5 @@ jobs:
- name: Git LFS pull
uses: ./.github/actions/lfs
- name: Build illumos
env:
GOOS: illumos
TESTFLAGS: '-test.v -test.short'
run: .github/workflows/build-test.sh
- name: Test illumos
uses: vmactions/omnios-vm@v1
with:
usesh: true
copyback: false
run: . ./test.sh
- name: Build Solaris
env:
GOOS: solaris
TESTFLAGS: '-test.v -test.short'
BUILDFLAGS: '-tags sqlite3_dotlk'
run: .github/workflows/build-test.sh
- name: Test Solaris
uses: vmactions/solaris-vm@v1
with:
usesh: true
copyback: false
run: . ./test.sh
continue-on-error: true
- name: Test
run: go test -v ./...

View File

@@ -77,7 +77,7 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and
Every commit is [tested](https://github.com/ncruces/go-sqlite3/wiki/Test-matrix) on
Linux (amd64/arm64/386/riscv64/ppc64le/s390x), macOS (amd64/arm64),
Windows (amd64), FreeBSD (amd64), OpenBSD (amd64), NetBSD (amd64),
illumos (amd64), and Solaris (amd64).
DragonFly BSD (amd64), illumos (amd64), and Solaris (amd64).
The Go VFS is tested by running SQLite's
[mptest](https://github.com/sqlite/sqlite/blob/master/mptest/mptest.c).