diff --git a/.github/workflows/checklocks.yml b/.github/workflows/checklocks.yml new file mode 100644 index 000000000..7cc1cdec9 --- /dev/null +++ b/.github/workflows/checklocks.yml @@ -0,0 +1,28 @@ +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@v3 + + - name: Build checklocks + run: ./tool/go build -o /tmp/checklocks gvisor.dev/gvisor/tools/checklocks/cmd/checklocks + + - name: Run checklocks vet + # TODO: remove || true once we have applied checklocks annotations everywhere. + run: ./tool/go vet -vettool=/tmp/checklocks ./... || true