chore: adopt OSS structure + move module to github.com/ridi/sqlglot-go #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: test (go ${{ matrix.go }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Oldest supported (go.mod) + latest stable. Zero third-party deps, so this is fast. | |
| go: ["1.23.x", "stable"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| cache: true | |
| - run: go build ./... | |
| - run: go test -race ./... | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| cache: true | |
| - name: gofmt | |
| run: | | |
| out="$(gofmt -l .)" | |
| if [ -n "$out" ]; then | |
| echo "::error::these files need gofmt:"; echo "$out"; exit 1 | |
| fi | |
| - run: go vet ./... | |
| - name: golangci-lint | |
| # v7 of the action runs golangci-lint v2 (matches .golangci.yml version: "2"). | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: latest | |
| # Only fail on issues introduced by the PR, so pre-existing findings in the | |
| # 1:1-ported code don't block. Tighten to a full run once the tree is clean. | |
| only-new-issues: true |