chore: Bump StackExchange.Redis from 3.0.17 to 3.0.25 #1555
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: Build and Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CONFIGURATION: Release | |
| COVERAGE_DIR: ./coverage | |
| PACKAGE_OUTPUT_PATH: ./nupkg | |
| PR_TARGET_FRAMEWORK: net10.0 | |
| SOLUTION_PATH: Ashlar.slnx | |
| jobs: | |
| build-and-test: | |
| name: ${{ github.event_name == 'pull_request' && 'Build and Test (Fast Validation)' || 'Build and Test (Full Validation)' }} | |
| runs-on: ubuntu-latest | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6.0.0 | |
| with: | |
| cache: true | |
| cache-dependency-path: | | |
| Ashlar.slnx | |
| global.json | |
| .config/dotnet-tools.json | |
| **/Directory.Build.props | |
| **/Directory.Packages.props | |
| **/*.csproj | |
| - name: Set up JDK 17 | |
| if: env.SONAR_TOKEN != '' | |
| uses: actions/setup-java@v5.6.0 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Restore Tools | |
| run: dotnet tool restore | |
| - name: Restore Dependencies | |
| run: dotnet restore "$SOLUTION_PATH" | |
| - name: Run SonarScanner Begin | |
| if: env.SONAR_TOKEN != '' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| args=( | |
| begin | |
| "/k:${{ vars.SONAR_PROJECT_KEY }}" | |
| "/o:${{ vars.SONAR_ORGANIZATION }}" | |
| "/d:sonar.host.url=${{ vars.SONAR_HOST_URL }}" | |
| "/d:sonar.cs.opencover.reportsPaths=${COVERAGE_DIR}/**/coverage.opencover.*.xml" | |
| "/d:sonar.plsql.file.suffixes=.pls,.plb,.pks,.pkb,.pck" | |
| ) | |
| dotnet sonarscanner "${args[@]}" | |
| - name: Build | |
| run: | | |
| args=("$SOLUTION_PATH" --configuration "$CONFIGURATION" --no-restore) | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| args+=(--framework "$PR_TARGET_FRAMEWORK") | |
| fi | |
| dotnet build "${args[@]}" | |
| - name: Test | |
| run: | | |
| args=( | |
| "$SOLUTION_PATH" | |
| --configuration "$CONFIGURATION" | |
| --no-build | |
| --no-restore | |
| --coverlet | |
| --results-directory "$COVERAGE_DIR" | |
| ) | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| args+=(--framework "$PR_TARGET_FRAMEWORK") | |
| fi | |
| dotnet test "${args[@]}" | |
| - name: Run SonarScanner End | |
| if: env.SONAR_TOKEN != '' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: dotnet sonarscanner end | |
| - name: Check Coverage | |
| run: dotnet coveragechecker --format Cobertura --glob-patterns "${COVERAGE_DIR}/**/coverage.cobertura.*.xml" --line-threshold 100 --branch-threshold 100 | |
| - name: Pack production packages | |
| if: github.event_name == 'push' | |
| run: dotnet pack "$SOLUTION_PATH" --configuration "$CONFIGURATION" --no-restore --output "$PACKAGE_OUTPUT_PATH" -p:AshlarOfficialBuild=true | |
| - name: Package Consumption Smoke Test | |
| if: github.event_name == 'push' | |
| shell: pwsh | |
| run: ./eng/package-consumption-smoke.ps1 -Configuration $env:CONFIGURATION -PackageOutputPath $env:PACKAGE_OUTPUT_PATH -SkipPack | |
| - name: Upload NuGet Packages | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: nuget-packages | |
| path: ${{ env.PACKAGE_OUTPUT_PATH }}/*.nupkg | |
| if-no-files-found: error | |
| compression-level: 0 |