Skip to content

Commit 8c230aa

Browse files
feat: integrate JSON Schema Test Suite with blacklisting and coverage reporting (#29)
1 parent 536c623 commit 8c230aa

File tree

22 files changed

+1350
-46
lines changed

22 files changed

+1350
-46
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v5
15+
with:
16+
submodules: recursive
1517

1618
- name: Install mise
1719
uses: jdx/mise-action@v2
@@ -46,6 +48,8 @@ jobs:
4648

4749
steps:
4850
- uses: actions/checkout@v5
51+
with:
52+
submodules: recursive
4953

5054
- name: Install mise
5155
uses: jdx/mise-action@v2
@@ -56,6 +60,14 @@ jobs:
5660
go-version-file: "go.mod"
5761
cache: true
5862

63+
# Verify Docker is available for testcontainers (Ubuntu only)
64+
- name: Verify Docker availability
65+
if: matrix.os == 'ubuntu-latest'
66+
run: |
67+
docker --version
68+
docker info
69+
echo "Docker is available for testcontainers"
70+
5971
- name: Get current date
6072
id: date
6173
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
@@ -78,7 +90,7 @@ jobs:
7890
if: matrix.os == 'windows-latest'
7991
env:
8092
ARAZZO_CACHE_DIR: ${{ runner.temp }}
81-
run: gotestsum --format testname -- -race ./...
93+
run: gotestsum --format testname -- -race $(go list ./... | grep -v 'jsonschema/oas3/tests')
8294

8395
- name: Calculate coverage
8496
if: matrix.os == 'ubuntu-latest'
@@ -101,6 +113,11 @@ jobs:
101113
# Checkout main branch in a temporary directory
102114
git worktree add /tmp/main-branch main
103115

116+
# Initialize submodules in the main branch worktree
117+
cd /tmp/main-branch
118+
git submodule update --init --recursive || echo "Submodule initialization failed, continuing without submodules"
119+
cd "$CURRENT_DIR"
120+
104121
# Run tests on main branch to get coverage (with timeout)
105122
cd /tmp/main-branch
106123
timeout 300 go test -coverprofile=main-coverage.out -covermode=atomic ./... > /dev/null 2>&1 || echo "Main branch tests failed or timed out"

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "jsonschema/oas3/tests/testsuite"]
2+
path = jsonschema/oas3/tests/testsuite
3+
url = https://github.com/json-schema-org/JSON-Schema-Test-Suite.git

go.mod

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,69 @@ require (
77
github.com/speakeasy-api/jsonpath v0.6.2
88
github.com/spf13/cobra v1.7.0
99
github.com/stretchr/testify v1.10.0
10+
github.com/testcontainers/testcontainers-go v0.38.0
1011
github.com/vmware-labs/yaml-jsonpath v0.3.2
1112
golang.org/x/sync v0.16.0
1213
golang.org/x/text v0.28.0
1314
gopkg.in/yaml.v3 v3.0.1
1415
)
1516

1617
require (
18+
dario.cat/mergo v1.0.1 // indirect
19+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
20+
github.com/Microsoft/go-winio v0.6.2 // indirect
21+
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
22+
github.com/containerd/errdefs v1.0.0 // indirect
23+
github.com/containerd/errdefs/pkg v0.3.0 // indirect
24+
github.com/containerd/log v0.1.0 // indirect
25+
github.com/containerd/platforms v0.2.1 // indirect
26+
github.com/cpuguy83/dockercfg v0.3.2 // indirect
1727
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
28+
github.com/distribution/reference v0.6.0 // indirect
29+
github.com/docker/docker v28.2.2+incompatible // indirect
30+
github.com/docker/go-connections v0.5.0 // indirect
31+
github.com/docker/go-units v0.5.0 // indirect
1832
github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 // indirect
33+
github.com/ebitengine/purego v0.8.4 // indirect
34+
github.com/felixge/httpsnoop v1.0.4 // indirect
35+
github.com/go-logr/logr v1.4.3 // indirect
36+
github.com/go-logr/stdr v1.2.2 // indirect
37+
github.com/go-ole/go-ole v1.2.6 // indirect
38+
github.com/gogo/protobuf v1.3.2 // indirect
39+
github.com/google/uuid v1.6.0 // indirect
1940
github.com/inconshreveable/mousetrap v1.1.0 // indirect
20-
github.com/kr/text v0.2.0 // indirect
41+
github.com/klauspost/compress v1.18.0 // indirect
42+
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
43+
github.com/magiconair/properties v1.8.10 // indirect
44+
github.com/moby/docker-image-spec v1.3.1 // indirect
45+
github.com/moby/go-archive v0.1.0 // indirect
46+
github.com/moby/patternmatcher v0.6.0 // indirect
47+
github.com/moby/sys/sequential v0.6.0 // indirect
48+
github.com/moby/sys/user v0.4.0 // indirect
49+
github.com/moby/sys/userns v0.1.0 // indirect
50+
github.com/moby/term v0.5.0 // indirect
51+
github.com/morikuni/aec v1.0.0 // indirect
52+
github.com/opencontainers/go-digest v1.0.0 // indirect
53+
github.com/opencontainers/image-spec v1.1.1 // indirect
54+
github.com/pkg/errors v0.9.1 // indirect
2155
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
56+
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
57+
github.com/shirou/gopsutil/v4 v4.25.5 // indirect
58+
github.com/sirupsen/logrus v1.9.3 // indirect
2259
github.com/spf13/pflag v1.0.5 // indirect
60+
github.com/tklauser/go-sysconf v0.3.12 // indirect
61+
github.com/tklauser/numcpus v0.6.1 // indirect
62+
github.com/yusufpapurcu/wmi v1.2.4 // indirect
63+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
64+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
65+
go.opentelemetry.io/otel v1.37.0 // indirect
66+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
67+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
68+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
69+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
70+
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
71+
golang.org/x/crypto v0.40.0 // indirect
72+
golang.org/x/net v0.42.0 // indirect
73+
golang.org/x/sys v0.34.0 // indirect
74+
google.golang.org/protobuf v1.36.6 // indirect
2375
)

0 commit comments

Comments
 (0)