-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (117 loc) · 4.13 KB
/
Copy pathconformance.yml
File metadata and controls
121 lines (117 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Conformance
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
cross-sdk:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
julia-version: ['1.10', '1']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: Instantiate test env
run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install surrealdb-py
run: pip install --upgrade pip && pip install surrealdb
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Provision server
run: bash scripts/setup-server.sh
- name: Forward — Python writes fixtures
run: python test/conformance/cross-sdk/write_test_data.py
env:
SURREALDB_URL: ws://localhost:8000/rpc
- name: Forward — Julia reads, asserts equal
run: julia --project=test test/conformance/cross-sdk/test_interop.jl
env:
SURREALDB_URL: ws://localhost:8000
- name: Reverse — Julia writes fixtures
run: julia --project=test test/conformance/cross-sdk/write_test_data_julia.jl
env:
SURREALDB_URL: ws://localhost:8000
- name: Reverse — Python reads, asserts equal
run: python test/conformance/cross-sdk/read_test_data.py
env:
SURREALDB_URL: ws://localhost:8000/rpc
- name: Reverse — Go reads, asserts equal
run: |
mkdir -p /tmp/go-interop && cd /tmp/go-interop
go mod init interop 2>/dev/null || true
go get github.com/surrealdb/surrealdb.go@latest
cp ${{ github.workspace }}/test/conformance/cross-sdk/read_test_data.go main.go
go run main.go
env:
SURREALDB_URL: ws://localhost:8000
language-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
julia-version: ['1.10', '1']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: Instantiate test env
run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Cache upstream checkout
uses: actions/cache@v4
with:
path: external/upstream
key: upstream-${{ hashFiles('external/pinned.toml') }}
- name: Setup upstream corpus
run: bash scripts/setup-upstream.sh
- name: Provision server
run: bash scripts/setup-server.sh
- name: Run language-tests
run: julia --project=test test/conformance/language-tests/runner.jl
wire:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
julia-version: ['1.10', '1']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: Instantiate test env
run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Provision server
run: bash scripts/setup-server.sh
- name: Run wire suite
run: |
julia --project=test -e "
wire_dir = joinpath(pwd(), \"test\", \"conformance\", \"wire\")
for f in sort(readdir(wire_dir, join=true))
endswith(f, \".jl\") && include(f)
end
"
parity-verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Regenerate CBOR fixtures
run: bash scripts/regen-cbor-fixtures.sh
- name: Assert fixtures are up to date
run: git diff --exit-code test/conformance/fixtures/cbor/native.toml