Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
pull_request:
push:
branches:
- master

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.mod

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.12.2
problem-matchers: true

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.mod

- name: Run unit tests
run: go test ./...
6 changes: 3 additions & 3 deletions engine/storage/jsonl/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ func (d *Decoder) decodeValue(name string, kind types.Kind, raw any) (types.Valu
}

case types.KindTimestamp:
return types.NewNullValue(), &types.TypeNotImplementedError{
Field: name,
Kind: kind,
return types.NewNullValue(), &types.TypeError{
Field: name,
Expected: kind,
}

default:
Expand Down
10 changes: 0 additions & 10 deletions engine/types/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,3 @@ func (e *TypeError) Error() string {

return "type error: field " + e.Field + " expected " + string(e.Expected) + " but got " + string(e.Actual)
}

// TypeNotImplementedError represents an error that occurs when a value's type is not implemented in the system.
type TypeNotImplementedError struct {
Field string // The name of the field that caused the error
Kind Kind // The kind of the field that is not implemented
}

func (e *TypeNotImplementedError) Error() string {
return "type not implemented error: field " + e.Field + " of kind " + string(e.Kind) + " is not implemented"
}
Loading