Skip to content

SEC-090: Automated trusted workflow pinning (2024-05-13) #140

SEC-090: Automated trusted workflow pinning (2024-05-13)

SEC-090: Automated trusted workflow pinning (2024-05-13) #140

Workflow file for this run

# Continuous integration handling for Go
name: ci-go
on:
pull_request:
paths:
- .github/workflows/ci-go.yml
- .golangci.yml
- go.mod
- '**.go'
permissions:
contents: read
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: 'go.mod'
- run: go mod download
- uses: golangci/golangci-lint-action@38e1018663fa5173f3968ea0777460d3de38f256 # v5.3.0
test:
name: test (Go v${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22', '1.21' ]
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: ${{ matrix.go-version }}
- run: go mod download
- run: go test -coverprofile=coverage.out ./...
- run: go tool cover -html=coverage.out -o coverage.html
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: go-${{ matrix.go-version }}-coverage
path: coverage.html