Skip to content

chore(deps): pin dependencies #301

chore(deps): pin dependencies

chore(deps): pin dependencies #301

Workflow file for this run

# name of the action
name: validate
# trigger on pull_request or push events
on:
pull_request:
push:
# pipeline to execute
jobs:
validate:
runs-on: ubuntu-latest
container:
image: golang:1.18@sha256:50c889275d26f816b5314fc99f55425fa76b18fcaf16af255f5d57f09e1f48da
steps:
- name: clone
uses: actions/checkout@v3
- name: validate
run: |
# Check that go mod tidy produces a zero diff; clean up any changes afterwards.
go mod tidy && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go vet ./... produces a zero diff; clean up any changes afterwards.
go vet ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go fmt ./... produces a zero diff; clean up any changes afterwards.
go fmt ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go fix ./... produces a zero diff; clean up any changes afterwards.
go fix ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)