feat(builtins): autogen using thorgen #42
Workflow file for this run
This file contains 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: Lint, Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Install dependencies | |
run: go mod download | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59.1 | |
args: --timeout=30m --config=.golangci.yml | |
- name: Generate builtins | |
run: go generate ./... | |
- name: Check `builtins` directory | |
# if it has any changes in the 'builtins' dir after running `go generate`, echo an error and fail the workflow | |
run: git diff --exit-code builtins || (echo "\n\n\nbuiltins directory is not up to date, run 'go generate ./...' to update it" && exit 1) | |
- name: Run tests | |
run: make test |