mirror of
https://github.com/tailscale/tailscale.git
synced 2026-03-29 03:31:22 -04:00
This repo's module is tailscale.com, and the tailscale-client-go-v2 repo uses tailscale.com/client/tailscale/v2. It seems from #19010 that if we have the client module as a dependency in this module, go vet will start to consider the client module as part of tailscale.com/... I'm not sure if this is a bug in go vet, but for now let's take the easy fix and specify ./... instead. In my testing, it seems like this is sufficient to make sure it just walks the file hierarchy and doesn't find the client module as a sub-path. Updates tailscale/corp#38418 Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: tailscale.com/cmd/vet
|
|
|
|
env:
|
|
HOME: ${{ github.workspace }}
|
|
# GOMODCACHE is the same definition on all OSes. Within the workspace, we use
|
|
# toplevel directories "src" (for the checked out source code), and "gomodcache"
|
|
# and other caches as siblings to follow.
|
|
GOMODCACHE: ${{ github.workspace }}/gomodcache
|
|
CMD_GO_USE_GIT_HASH: "true"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "release-branch/*"
|
|
paths:
|
|
- "**.go"
|
|
pull_request:
|
|
paths:
|
|
- "**.go"
|
|
|
|
jobs:
|
|
vet:
|
|
runs-on: [ self-hosted, linux ]
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
path: src
|
|
|
|
- name: Build 'go vet' tool
|
|
working-directory: src
|
|
run: ./tool/go build -o /tmp/vettool tailscale.com/cmd/vet
|
|
|
|
- name: Run 'go vet'
|
|
working-directory: src
|
|
# Must use ./... instead of tailscale.com/... because the latter will
|
|
# include the v2 go client (tailscale.com/client/tailscale/v2) if it's
|
|
# a dependency in our go.mod file. Possibly a go vet bug, but avoid
|
|
# cross-repo vetting for now so we can safely add the dependency.
|
|
run: ./tool/go vet -vettool=/tmp/vettool ./...
|