🔬 CodeQL: Semantic code analysis #650
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: '🔬 CodeQL: Semantic code analysis' | |
| on: | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - '!src/qodana.yml' | |
| - '.github/workflows/codeql.yml' | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - 'master' | |
| paths: | |
| - 'src/**' | |
| - '!src/qodana.yml' | |
| - '.github/workflows/codeql.yml' | |
| schedule: | |
| - cron: '20 23 * * 0' | |
| workflow_dispatch: | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| Configuration: Release | |
| defaults: | |
| run: | |
| shell: pwsh | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| scan: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 360 | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'csharp' ] | |
| steps: | |
| - name: 📥 checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🎰 initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - name: 🏗️ build | |
| run: | | |
| $ErrorActionPreference = 'stop' | |
| dotnet build ./src/Objectivity.AutoFixture.XUnit2.AutoMock.sln | |
| if ($LastExitCode -ne 0) { | |
| throw "dotnet build failed with exit code $LastExitCode" | |
| } | |
| - name: 🔬 analyze with CodeQL | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| category: '/language:${{ matrix.language }}' |