Skip to content

Commit

Permalink
add codeql action
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalcaliskan committed Oct 3, 2021
1 parent f4f129f commit dd7ce33
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,33 @@ jobs:
- name: Test
run: make test

codeql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

build:
needs:
- lint
- vet
- ineffassign
- test
- codeql
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
Expand All @@ -74,4 +97,4 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: make build
run: make build
21 changes: 21 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,34 @@ jobs:
- name: Test
run: make test

codeql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

coverage:
runs-on: ubuntu-latest
needs:
- lint
- vet
- ineffassign
- test
- codeql
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down

0 comments on commit dd7ce33

Please sign in to comment.