Skip to content

Merge pull request #2229 from step-security-bot/stepsecurity_remediat… #1942

Merge pull request #2229 from step-security-bot/stepsecurity_remediat…

Merge pull request #2229 from step-security-bot/stepsecurity_remediat… #1942

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main # to update code coverage
permissions: # added using https://github.com/step-security/secure-repo
contents: read
concurrency:
group: ${{ github.workflow }}
jobs:
test:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v1
with:
allowed-endpoints: >
api.github.com:443
codecov.io:443
uploader.codecov.io:443
github.com:443
proxy.golang.org:443
sum.golang.org:443
storage.googleapis.com:443
objects.githubusercontent.com:443
golang.org:443
- name: Checkout
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Go
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # v2.1.3
with:
go-version: 1.17
- name: Run coverage
run: go test ./... -coverpkg=./... -race -coverprofile=coverage.txt -covermode=atomic
env:
PAT: ${{ secrets.GITHUB_TOKEN }}
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2