1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
otto/.github/workflows/test-lint.yml
Steven Hartland 233dfa4ef0
chore: remove perl, make and local docs. (#476)
Remove the dependencies on perl and make.

inline.pl is replaced by tools/gen-jscore and token/tokenfmt is replaced
by tools/gen-tokens which are both golang text/template utilities.

gen-jscore uses property ordering that matches chromes output ordering
adding missing properties to the Error types.

Local generated documentation have been removed as https://pkg.go.dev/
is more feature rich.

The use of make has been removed as the functionality is now replicated by
standard golang tools go test ./... and go generate ./... as well as integrated
into github actions.
2022-12-05 22:19:34 +00:00

44 lines
982 B
YAML

name: Go test and lint
on:
pull_request:
branches: 'master'
jobs:
go-test-lint:
strategy:
matrix:
go: [1.19, 1.18]
golangcli: [v1.50.1]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- name: Validate go mod / generate
run: |
go mod tidy
go generate ./...
git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]]
- name: Go Lint
uses: golangci/golangci-lint-action@v3
with:
version: ${{ matrix.golangci }}
args: "--out-${NO_FUTURE}format colored-line-number"
skip-pkg-cache: true
skip-build-cache: true
- name: Go Build
run: go build ./...
- name: Go Test
run: go test -race -v ./...