Skip to content

Bump go.uber.org/zap from 1.19.0 to 1.24.0 #187

Bump go.uber.org/zap from 1.19.0 to 1.24.0

Bump go.uber.org/zap from 1.19.0 to 1.24.0 #187

Workflow file for this run

name: Pull Request Build
on:
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.16
uses: actions/[email protected]
with:
go-version: 1.16
id: go
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Upgrade upx
run: |
# try to fix https:/jenkins-zh/jenkins-cli/issues/493
wget https:/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
tar xvf upx-3.96-amd64_linux.tar.xz
upx-3.96-amd64_linux/upx -V
sudo mv upx-3.96-amd64_linux/upx $(which upx)
upx -V
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
args: release --skip-publish --rm-dist
- name: Upload Artifact for darwin
uses: actions/upload-artifact@v2
with:
name: jcli-darwin-amd64
path: release/jcli-darwin-amd64.tar.gz
- name: Upload Artifact for linux
uses: actions/upload-artifact@v2
with:
name: jcli-linux-amd64
path: release/jcli-linux-amd64.tar.gz
GoLint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
uses: actions/[email protected]
with:
go-version: 1.16
id: go
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Go-linter-1
uses: Jerome1337/[email protected]
with:
golint-path: app/cmd/...
- name: Go-linter-2
uses: Jerome1337/[email protected]
with:
golint-path: app/helper/...
- name: Go-linter-3
uses: Jerome1337/[email protected]
with:
golint-path: app/i18n/i18n.go
- name: Go-linter-4
uses: Jerome1337/[email protected]
with:
golint-path: app/.
- name: Go-linter-5
uses: Jerome1337/[email protected]
with:
golint-path: client/...
- name: Go-linter-6
uses: Jerome1337/[email protected]
with:
golint-path: util/...
Security:
name: Security
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/[email protected]
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: '-exclude=G402,G204,G304,G110 app/cmd/common'
# - name: SonarCloud Scan
# uses: LinuxSuRen/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# - name: Test
# run: |
# export PATH=$PATH:${PWD}/bin:$GOPATH/bin:/home/runner/go/bin
# make test
UnitTest:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.16
uses: actions/[email protected]
with:
go-version: 1.16
id: go
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Test
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true