Skip to content

Commit ff9eb06

Browse files
committed
Work around compare test fail, upgrade workflow
* Work around cburgmer/json-path-comparison#167 by re-marshaling data to JSON and back * Upgrade to TinyGo 0.40.1 * Upgrade to actions/checkout@v6 * Don't fail fast; run full test matrix * Update to the latest jsonpath-compliance-test-suite
1 parent 86f47b0 commit ff9eb06

4 files changed

Lines changed: 21 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ on:
55
jobs:
66
build:
77
strategy:
8+
fail-fast: false
89
matrix:
910
os: [[🐧, Ubuntu], [🍎, macOS], [🪟, Windows]]
1011
go: ["1.26", "1.25", "1.24", "1.23"]
1112
name: ${{ matrix.os[0] }} Test Go ${{ matrix.go }} on ${{ matrix.os[1] }}
1213
runs-on: ${{ matrix.os[1] }}-latest
1314
steps:
1415
- name: Checkout Repo
15-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1617
with: { submodules: true }
1718
- name: Setup Go
1819
uses: actions/setup-go@v5
@@ -21,15 +22,16 @@ jobs:
2122
run: make test-all
2223
- name: Setup TinyGo
2324
uses: acifani/setup-tinygo@v2
24-
with: { tinygo-version: 0.39.0 }
25+
with: { tinygo-version: 0.40.1 }
2526
- name: Test WASM
27+
if: matrix.go != '1.26'
2628
run: make wasm
2729
lint:
2830
name: 📊 Lint and Cover
2931
runs-on: ubuntu-latest
3032
steps:
3133
- name: Checkout Repo
32-
uses: actions/checkout@v4
34+
uses: actions/checkout@v6
3335
with: { submodules: true }
3436
- name: Setup Go
3537
uses: actions/setup-go@v5

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1212
steps:
1313
- name: Check out the repo
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515
- name: Generate Release Notes
1616
id: notes
1717
uses: theory/changelog-version-notes-action@v0

compare/compare_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
package compare
1212

1313
import (
14+
"encoding/json"
1415
"os"
1516
"path/filepath"
1617
"runtime"
@@ -60,6 +61,10 @@ func TestConsensus(t *testing.T) {
6061
"dot_notation_with_dash": "RFC 9535 § 2.5.1.1: dash disallowed in shorthand hames",
6162
}
6263

64+
reMarshal := map[string]string{
65+
"filter_expression_with_equals_number_on_various_representations": "cburgmer/json-path-comparison#167",
66+
}
67+
6368
for _, q := range queries(t) {
6469
t.Run(q.ID, func(t *testing.T) {
6570
t.Parallel()
@@ -80,6 +85,15 @@ func TestConsensus(t *testing.T) {
8085
t.Skip(r)
8186
}
8287

88+
if _, ok := reMarshal[q.ID]; ok {
89+
data, err := json.Marshal(q.Consensus)
90+
require.NoError(t, err)
91+
require.NoError(t, json.Unmarshal(data, &q.Consensus))
92+
data, err = json.Marshal(q.Document)
93+
require.NoError(t, err)
94+
require.NoError(t, json.Unmarshal(data, &q.Document))
95+
}
96+
8397
path, err := jsonpath.Parse(q.Selector)
8498
require.NoError(t, err)
8599
result := []any(path.Select(q.Document))

0 commit comments

Comments
 (0)