Skip to content

ci: harden workflows, upgrade actions, fix caching #19

ci: harden workflows, upgrade actions, fix caching

ci: harden workflows, upgrade actions, fix caching #19

Workflow file for this run

name: build
on:
push:
branches:
tags:
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: set up go 1.23
uses: actions/setup-go@v6
with:
go-version: "1.23"
id: go
- name: build and test
run: |
go get -v
go test -timeout=60s -race -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "_mock.go" > $GITHUB_WORKSPACE/profile.cov
go build -race
env:
GO111MODULE: "on"
TZ: "America/Chicago"
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: "v2.11.1"
- name: submit coverage
run: |
go install github.com/mattn/goveralls@latest
goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}