From 39ec20011f75813ce24aea6ce0ef269f998b3bab Mon Sep 17 00:00:00 2001 From: nscuro Date: Tue, 22 Jun 2021 20:22:43 +0200 Subject: [PATCH] ci: include golangci-lint in workflow Signed-off-by: nscuro --- .github/workflows/ci.yml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a790430..2825ef1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,34 @@ name: CI -on: [ push, pull_request ] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: - build: - name: Build + golangci: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest + + test: + name: Test runs-on: ubuntu-latest strategy: matrix: - go: [ "^1.14", "^1.15", "^1.16" ] + go: + - "^1.14" + - "^1.15" + - "^1.16" steps: - name: Setup Go uses: actions/setup-go@v2 @@ -22,8 +42,6 @@ jobs: chmod +x "$HOME/.local/bin/cyclonedx" - name: Checkout Repository uses: actions/checkout@v2 - - name: Build - run: make build - name: Test run: make test - name: Generate SBOM @@ -31,4 +49,4 @@ jobs: with: json: true type: library - version: v0.8.1 + version: latest