ci: add codeql workflow #101
Workflow file for this run
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: "check" | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test-versions: | |
| permissions: | |
| contents: read | |
| actions: write | |
| checks: write | |
| strategy: | |
| matrix: | |
| csharpFunctionalExtensionsVersion: ["2.29.0", "2.*", "3.0.0", "3.*"] | |
| fail-fast: false | |
| uses: ./.github/workflows/test-version.yml | |
| with: | |
| csharpFunctionalExtensionsVersion: ${{ matrix.csharpFunctionalExtensionsVersion }} | |
| check: | |
| runs-on: ubuntu-latest | |
| needs: test-versions | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 7 | |
| 8 | |
| 9.0.201 | |
| 10.0.100 | |
| - name: Install .NET tools | |
| run: dotnet tool restore | |
| - name: Install .NET dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore -p:ContinuousIntegrationBuild=true | |
| - name: Pack | |
| run: dotnet pack ./CSharpFunctionalExtensions.HttpResults/CSharpFunctionalExtensions.HttpResults.csproj -c Release -p:ContinuousIntegrationBuild=true -p:Version=0.0.0 --output dist/package | |
| - name: Lint | |
| run: dotnet csharpier check . | |
| - name: Link Checker | |
| id: lychee | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| fail: true | |
| args: --remap '${{ github.event.repository.default_branch }} ${{ github.head_ref || github.ref_name }}' . | |
| jobSummary: true | |
| format: markdown |