Skip to content

Commit

Permalink
github-action: add codeql-analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
xhit committed Jul 4, 2023
1 parent 2982163 commit ea7ecef
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 6 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: ['go']

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: go build -v .

- name: Test
run: env GO111MODULE=on go test -v -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic
run: env GO111MODULE=on go test -v -timeout 30m -race -coverprofile='coverage.txt' -covermode=atomic

- name: Codecov
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit ea7ecef

Please sign in to comment.