Add weekly CodeQL analysis for C# code. Add dotnet format verification step to CI. Create .env.example documenting required environment variables. Co-Authored-By: Svrnty Inc. <eng@svrnty.com>
48 lines
950 B
YAML
48 lines
950 B
YAML
name: CodeQL
|
|
|
|
on:
|
|
push:
|
|
branches: [JP]
|
|
pull_request:
|
|
branches: [JP]
|
|
schedule:
|
|
- cron: "0 8 * * 1" # Weekly on Monday at 08:00 UTC
|
|
|
|
concurrency:
|
|
group: codeql-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
|
|
jobs:
|
|
analyze:
|
|
name: CodeQL Analysis
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
language: [csharp]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: "10.0.x"
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v3
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
|
|
- name: Build
|
|
run: dotnet build Svrnty.CQRS.sln
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v3
|
|
with:
|
|
category: "/language:${{ matrix.language }}"
|