perkeep/.github/workflows/tests-tidy.yaml

33 lines
667 B
YAML
Raw Permalink Normal View History

on:
push:
branches:
- "master"
pull_request:
# all PRs on all branches
name: "tests/tidy"
jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
2024-01-14 23:16:18 +00:00
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
2024-01-14 23:16:18 +00:00
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Check for tidyness
run: |
go mod tidy
test -z "$(git status --porcelain)"