Skip to content

Commit

Permalink
[#1279] update codeql and golang versions
Browse files Browse the repository at this point in the history
- switch go to manual build mode to fix "Some packages could not be found"
- ping go version in the new setup-go action to fix "Invalid Go toolchain version"
- update action versions
  • Loading branch information
andrei-pavel committed Jul 11, 2024
1 parent 1e20778 commit dbbaf08
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,46 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ javascript, go, python ]
include:
- language: go
build-mode: manual
- language: python
build-mode: autobuild
- language: typescript
build-mode: autobuild

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

- name: Setup Go
if: ${{ matrix.language == 'go' }}
uses: actions/setup-go@v5
with:
cache-dependency-path: backend/go.sum
go-version: 1.22.5

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

# Remove the tools directory to not perform analysis on go dependencies which results in
# unactionable errors like "use of internal package not allowed", "generic function is missing function body",
# "invalid recursive type: bool refers to itself", "could not import package" and others.
- name: Manual Go Build
if: ${{ matrix.language == 'go' }}
run: |
rake build:agent
rake build:server
sudo rm -r ./tools
- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: ${{ matrix.language == 'javascript' || matrix.language == 'go' || matrix.language == 'python' }}
if: ${{ matrix.language == 'python' || matrix.language == 'typescript' }}
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
category: "/language:${{ matrix.language }}"

0 comments on commit dbbaf08

Please sign in to comment.