Skip to content

Commit 9d191a6

Browse files
authored
Merge pull request #8 from CovenantSQL/deps/module-tooling
Add reproducible module tooling and GitHub Actions
2 parents 6f7b4ca + bbec715 commit 9d191a6

5 files changed

Lines changed: 33 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

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

5+
The module builds with Go 1.11 and later. Regenerating `sql.go` with
6+
`make -B sql.go` requires Go 1.17 or later for versioned `go run` support.
7+
The Makefile pins the generator that reproduces the committed parser byte
8+
for byte.
9+
510
## Notice
611

712
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)