Skip to content

fix: [CN-40] add zap censor handler #198

fix: [CN-40] add zap censor handler

fix: [CN-40] add zap censor handler #198

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Test
run: go test -v ./...
coverage:
name: test coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '^1.21'
- name: generate test coverage
run: go test ./... -coverprofile=./cover.out
- name: check test coverage
id: coverage
uses: vladopajic/go-test-coverage@v2
with:
config: ./.testcoverage.yml
- name: make coverage badge
uses: action-badges/core@0.2.2
if: contains(github.ref, 'main')
with:
label: coverage
message: ${{ steps.coverage.outputs.badge-text }}
message-color: ${{ steps.coverage.outputs.badge-color }}
file-name: coverage.svg
badge-branch: badges
github-token: "${{ secrets.GH_TOKEN }}"
golangci-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.54.2
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
install-mode: "binary"