Skip to content

chore(deps): update github/codeql-action action to v3 #52

chore(deps): update github/codeql-action action to v3

chore(deps): update github/codeql-action action to v3 #52

Workflow file for this run

name: tests
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, closed]
branches:
- main
push:
branches:
- main
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.action != 'closed' || github.event.pull_request.merged == true)
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Run golanci Linter
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: Run the Tests
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
# workaround for codeclimate test coverage tool error
# see https://github.com/codeclimate/test-reporter/issues/304#issuecomment-907436716
mkdir -p ./github.com/seinshah
ln -s $PWD ./github.com/seinshah/gerrors
./cc-test-reporter before-build
go test -race -coverprofile c.out ./...
./cc-test-reporter after-build --exit-code $?
security:
name: Security
needs: validate
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.action != 'closed' || github.event.pull_request.merged == true)
steps:
- uses: actions/checkout@v3
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: ./...
- name: Running govulncheck
uses: Templum/[email protected]
with:
package: ./...
release:
name: Release
needs: security
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.merged == true)
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: paulhatch/[email protected]
with:
tag_prefix: v
major_pattern: breaking
minor_pattern: feat
format: ${major}.${minor}.${patch}