Skip to content

chore(readme): update old package name; tests: add coverage #46

chore(readme): update old package name; tests: add coverage

chore(readme): update old package name; tests: add coverage #46

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.60.2
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