mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-26 19:46:27 -08:00
GitHub provides a way to define problem matchers, that grep the output of a GitHub Actions workflow to extract errors and surface them when tests fail. This patch adds a .github/go-matcher.json that matches Go error messages from `go build` and `go test`, among other `go` tool output. This file was derived from matchers.json in actions/setup-go@d8cbb80. Updates #TBD Change-Id: I1f6f42fa0ada139f5742dc9a9f923cbad20bd2c9 Signed-off-by: Simon Law <[email protected]>
38 lines
987 B
YAML
38 lines
987 B
YAML
name: checklocks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- '**/*.go'
|
|
- '.github/workflows/checklocks.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
checklocks:
|
|
runs-on: [ ubuntu-latest ]
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Register Go problem matcher
|
|
run: echo '::add-matcher::.github/go-matcher.json'
|
|
|
|
- name: Build checklocks
|
|
run: ./tool/go build -o /tmp/checklocks gvisor.dev/gvisor/tools/checklocks/cmd/checklocks
|
|
|
|
- name: Run checklocks vet
|
|
# TODO(#12625): add more packages as we add annotations
|
|
run: |-
|
|
./tool/go vet -vettool=/tmp/checklocks \
|
|
./envknob \
|
|
./ipn/store/mem \
|
|
./net/stun/stuntest \
|
|
./net/wsconn \
|
|
./proxymap
|