ci: add CodeQL scanning, format check, and .env.example
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>
This commit is contained in:
@@ -32,3 +32,6 @@ jobs:
|
||||
|
||||
- name: Test
|
||||
run: dotnet test Svrnty.CQRS.sln --no-build --verbosity normal
|
||||
|
||||
- name: Format check
|
||||
run: dotnet format Svrnty.CQRS.sln --verify-no-changes
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
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 }}"
|
||||
Reference in New Issue
Block a user