Skip to content

Fix GitHub ListPullRequestReviews (#118) #624

Fix GitHub ListPullRequestReviews (#118)

Fix GitHub ListPullRequestReviews (#118) #624

Workflow file for this run

name: Test
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
- name: Go Cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
run: go vet ./...
- name: Static Code Analysis
uses: golangci/golangci-lint-action@v3
if: runner.os == 'Linux'
with:
args: |
--timeout 5m --out-${NO_FUTURE}format colored-line-number --enable errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars
- name: Run Gosec Security Scanner
uses: securego/gosec@master
if: runner.os == 'Linux'
# Run tests
- name: Tests
run: go test -v -race -covermode atomic -coverprofile=covprofile ./...
# Generate code coverage
- name: Send coverage
run: |
go install github.com/mattn/goveralls@latest
goveralls -coverprofile=covprofile -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: runner.os == 'Linux'