Skip to content

Reference workflow actions by SHA (#141) #137

Reference workflow actions by SHA (#141)

Reference workflow actions by SHA (#141) #137

Workflow file for this run

name: Go
on:
push:
branches: ['*']
tags: ['v*']
pull_request:
branches: ['*']
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.17.x", "1.18.x", "1.19.x"]
include:
- go: 1.19.x
latest: true
steps:
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
- name: Load cached dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v.3.3.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
if: matrix.latest
run: make lint
- name: Test
run: make cover
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1