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