Skip to content

Commit 2d5633c

Browse files
committed
Add reproducible module tooling and GitHub Actions
Declare the self-contained module without raising its language baseline beyond Go 1.11. Pin the generator that reproduces sql.go byte for byte. Replace the inactive Travis configuration and obsolete coverage tool installations with build, regeneration, vet, and test checks.
1 parent c4a6cf6 commit 2d5633c

5 files changed

Lines changed: 32 additions & 18 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-go@v5
16+
with:
17+
go-version: '1.27.x'
18+
cache: false
19+
- run: go build ./...
20+
- run: make -B sql.go
21+
- run: git diff --exit-code -- sql.go
22+
- run: go vet ./...
23+
- run: go test -count=1 ./...

‎.travis.yml‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# limitations under the License.
1414

1515
MAKEFLAGS = -s
16+
GOYACC = go run golang.org/x/tools/cmd/goyacc@v0.0.0-20180926032708-9eb9690e392a
1617

1718
sql.go: sql.y
18-
goyacc -o sql.go sql.y
19+
$(GOYACC) -o sql.go sql.y
1920
gofmt -w sql.go
2021

2122
clean:

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Go package for parsing SQLite or SQL-92 queries.
44

5+
The module supports Go 1.11 and later. Regenerate `sql.go` with
6+
`make -B sql.go` using Go 1.16 or later; the Makefile pins the generator
7+
that reproduces the committed parser byte for byte.
8+
59
## Notice
610

711
The backbone of this repo is extracted from [vitessio/vitess](https://github.com/vitessio/vitess).

‎go.mod‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/CovenantSQL/sqlparser
2+
3+
go 1.11

0 commit comments

Comments
 (0)