Skip to content

Merge pull request #28 from wolfeidau/dependabot/github_actions/actio… #68

Merge pull request #28 from wolfeidau/dependabot/github_actions/actio…

Merge pull request #28 from wolfeidau/dependabot/github_actions/actio… #68

Workflow file for this run

name: Go
on:
push:
paths-ignore:
- 'README.md'
concurrency:
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: true
id: go
- name: Build
run: make build
- name: Run linters
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: latest
skip-go-installation: true
- name: Install tparse
run: go install github.com/mfridman/tparse@latest
- name: Test
env:
COVER_OPTS: "-coverprofile=coverage.txt -covermode=atomic"
GOFLAGS: "-v -count=1 -json"
run: go test $COVER_OPTS ./... | tparse -all -notests -format markdown >> $GITHUB_STEP_SUMMARY
- name: Verify git clean
shell: bash
run: |
if [[ -z "$(git status --porcelain)" ]]; then
echo "${{ github.repository }} up to date."
else
echo "${{ github.repository }} is dirty."
echo "::error:: $(git status)"
exit 1
fi