Skip to content

Commit

Permalink
Add CodeQL check (#18)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
  • Loading branch information
jpkrohling authored Oct 29, 2020
1 parent c48efd1 commit 3829f04
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ pull_request_rules:
conditions:
- "#approved-reviews-by>=1"
- "-draft"
- "status-success=Build"
- "status-success=Integration test"
- "status-success=build"
- "status-success=lint"
- "status-success=security"
- "status-success=integration-test"
actions:
merge:
method: squash
Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: "Continuous Integration"

on:
push:
Expand All @@ -7,9 +7,9 @@ on:
branches: [ master ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
unit-tests:
name: Unit tests
runs-on: ubuntu-20.04
steps:

- name: Set up Go 1.14
Expand All @@ -24,10 +24,34 @@ jobs:
- name: Test
run: go test -v ./...

lint:
name: Code standards (linting)
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
args: --enable=gosec,maligned,misspell
only-new-issues: true

security:
name: Security
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

0 comments on commit 3829f04

Please sign in to comment.