From 48ebff878ebc13e384328d68bb6ee21e86cba694 Mon Sep 17 00:00:00 2001 From: Russel Van Tuyl Date: Tue, 28 Nov 2023 07:56:34 -0500 Subject: [PATCH] Action workflow updates --- .github/workflows/go_dev.yml | 57 +++++++++++++++++++++++ .github/workflows/{go.yml => go_main.yml} | 7 +-- 2 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/go_dev.yml rename .github/workflows/{go.yml => go_main.yml} (93%) diff --git a/.github/workflows/go_dev.yml b/.github/workflows/go_dev.yml new file mode 100644 index 00000000..098f1f99 --- /dev/null +++ b/.github/workflows/go_dev.yml @@ -0,0 +1,57 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: "Merlin Server Build & Test: !main" + +on: + push: + branches-ignore: + - main + pull_request: + +jobs: + + build: + name: 'Code Quality Scan & Build: !main' + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + id: checkout + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: 'Build Merlin Server' + id: build + run: 'make distro' + + - name: 'Test Merlin Server' + id: test + run: 'go test ./...' + + - name: GoVulnCheck + id: govulncheck + uses: golang/govulncheck-action@v1 + with: + go-version-input: '1.21' + go-package: './...' + + - name: Gosec Security Scanner + id: gosec + uses: securego/gosec@master + + - name: Go Report Card - Install + id: goreportcard_install + working-directory: /tmp + run: | + git clone https://github.com/gojp/goreportcard.git + cd goreportcard + make install + go install ./cmd/goreportcard-cli + + - name: Go Report Card - Run + id: goreportcard_run + run: 'goreportcard-cli -v' # This renames the files in the ./rpc directory to *.grc.bak causing builds to fail diff --git a/.github/workflows/go.yml b/.github/workflows/go_main.yml similarity index 93% rename from .github/workflows/go.yml rename to .github/workflows/go_main.yml index e6042733..4e250acb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go_main.yml @@ -1,16 +1,17 @@ # This workflow will build a golang project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go -name: "Merlin Server Build & Test" +name: "Merlin Server Build & Test: Main" on: push: - pull_request: + branches: + - main jobs: build: - name: 'Build Job' + name: 'Code Quality Scan & Build: main' runs-on: ubuntu-latest steps: - name: Checkout Repository