From dd7ce3342afe3321ef1ce0ac41821e9a0ac0d2ad Mon Sep 17 00:00:00 2001 From: bilalcaliskan Date: Sun, 3 Oct 2021 12:54:22 +0300 Subject: [PATCH] add codeql action --- .github/workflows/pr.yml | 25 ++++++++++++++++++++++++- .github/workflows/push.yml | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 28e0396..82225a9 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 ] @@ -74,4 +97,4 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Test - run: make build \ No newline at end of file + run: make build diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 31de871..f088b9b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -60,6 +60,26 @@ 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: @@ -67,6 +87,7 @@ jobs: - vet - ineffassign - test + - codeql steps: - name: Checkout code uses: actions/checkout@v2