Skip to content

Commit

Permalink
add custom codeQL analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender committed Nov 26, 2024
1 parent d5c4d04 commit 85e5493
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/test-codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]

pull_request:
branches: [ "main" ]

schedule:
- cron: '51 14 * * 6'

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

permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: csharp
- language: javascript-typescript

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- if: matrix.language == 'csharp'
name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
dotnet-quality: "ga"

- if: matrix.language == 'csharp'
name: Build .NET solution
run: |
dotnet build server/ChartBackend.sln \
--configuration Release \
--property:ContinuousIntegrationBuild=true \
-warnAsError
- if: matrix.language == 'javascript-typescript'
name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"
cache-dependency-path: client/package-lock.json

- if: matrix.language == 'javascript-typescript'
name: Build website
working-directory: ./client
run: |
run: npm install
run: npm run build.prod
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

0 comments on commit 85e5493

Please sign in to comment.