chore(deps-dev): Bump fast-uri from 3.1.3 to 3.1.4 in /ide/vscode #714
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| reason: | |
| description: 'Reason' | |
| required: false | |
| default: 'Manual run' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOTNET_NOLOGO: true | |
| INCLUDE_SYMBOLS: true | |
| jobs: | |
| pr-checks: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Restore | |
| run: | | |
| dotnet restore JD.Efcpt.Build.sln --use-lock-file | |
| dotnet tool restore | |
| - name: Install efcpt global tool | |
| run: | | |
| dotnet tool install -g erikej.efcorepowertools.cli --version 10.1.1055 | |
| echo "${HOME}/.dotnet/tools" >> $GITHUB_PATH | |
| - name: Build (Release) | |
| run: dotnet build JD.Efcpt.Build.sln --configuration Release --no-restore /p:ContinuousIntegrationBuild=true | |
| - name: Ensure Samples restored | |
| run: | | |
| dotnet restore tests/TestAssets/SampleDatabase/Sample.Database.sqlproj | |
| dotnet restore tests/TestAssets/SampleApp/Sample.App.csproj | |
| - name: Ensure Samples build | |
| run: | | |
| dotnet build --configuration Release tests/TestAssets/SampleDatabase/Sample.Database.sqlproj | |
| dotnet build --configuration Release tests/TestAssets/SampleApp/Sample.App.csproj | |
| - name: Test with coverage | |
| run: | | |
| dotnet test JD.Efcpt.Build.sln \ | |
| --configuration Release \ | |
| --no-build \ | |
| /p:EfcptToolMode=tool-manifest \ | |
| --collect:"XPlat Code Coverage" \ | |
| -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura \ | |
| -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Include="[JD.Efcpt.Build*]*" \ | |
| -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Exclude="[*Tests]*" | |
| - name: Install ReportGenerator | |
| run: dotnet tool update -g dotnet-reportgenerator-globaltool | |
| - name: Combine coverage and create reports | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| REPORTS=$(find . -type f -path "*/TestResults/*/coverage.cobertura.xml" | tr '\n' ';') | |
| if [ -z "$REPORTS" ]; then | |
| echo "No coverage reports found" >&2 | |
| exit 1 | |
| fi | |
| reportgenerator \ | |
| -reports:"$REPORTS" \ | |
| -targetdir:"coverage-report" \ | |
| -reporttypes:"HtmlInline;Cobertura;TextSummary;lcov;Badges" \ | |
| -assemblyfilters:"+JD.Efcpt.Build*;-*Tests*" \ | |
| -filefilters:"-**/*.Tests/*;-**/*Tests*/**" | |
| echo "COVERAGE_SUMMARY<<EOF" >> $GITHUB_ENV | |
| cat coverage-report/Summary.txt >> $GITHUB_ENV | |
| echo "EOF" >> $GITHUB_ENV | |
| - name: Upload coverage HTML report | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: coverage-report | |
| - name: Add coverage summary to PR | |
| uses: marocchino/sticky-pull-request-comment@v3.0.5 | |
| with: | |
| recreate: true | |
| message: | | |
| ## Code Coverage | |
| ``` | |
| ${{ env.COVERAGE_SUMMARY }} | |
| ``` | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: | | |
| **/TestResults/*/coverage.cobertura.xml | |
| flags: unittests | |
| fail_ci_if_error: true | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| # Cross-OS build + unit test matrix (#191). | |
| # | |
| # This is deliberately ADDITIVE to `pr-checks` above, not a replacement for it: | |
| # - `pr-checks` (ubuntu-only) remains the merge-gating job and is the only job that runs the | |
| # FULL test suite, including Testcontainers/live-DB/real-efcpt integration tests, and | |
| # publishes code coverage. Its job id/name is unchanged. | |
| # - `build-test-matrix` proves the library actually builds and its non-integration unit/logic | |
| # test suite actually passes on windows-latest and macos-latest, not just ubuntu - catching | |
| # path-separator, line-ending, and other OS-specific behavior that an ubuntu-only pipeline | |
| # can never surface. | |
| # - Integration tests (Testcontainers, live cloud secrets, the real `efcpt` CLI, and the | |
| # net472 Framework-MSBuild host tests) are excluded on EVERY leg here via | |
| # `--filter "Category!=Integration"` - they require Docker with Linux containers and/or the | |
| # efcpt tool and are not run on windows/macos GitHub-hosted runners. That coverage (including | |
| # the net472 MSBuild-host task-loading path) stays on the ubuntu `pr-checks` job, which runs | |
| # the full suite. See tests tagged `[Trait("Category", "Integration")]`. | |
| build-test-matrix: | |
| name: build-test-matrix | |
| if: github.event_name == 'pull_request' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Restore | |
| run: dotnet restore JD.Efcpt.Build.sln --use-lock-file | |
| - name: Build (Release) | |
| run: dotnet build JD.Efcpt.Build.sln --configuration Release --no-restore /p:ContinuousIntegrationBuild=true | |
| # Category!=Integration excludes Testcontainers/live-DB/real-efcpt tests (they require | |
| # Docker with Linux containers and/or the erikej.efcorepowertools.cli global tool, neither | |
| # of which is installed on this leg - those tests keep running on ubuntu via `pr-checks`). | |
| - name: Test (excluding integration) | |
| run: dotnet test JD.Efcpt.Build.sln --configuration Release --no-build --filter "Category!=Integration" | |
| # Samples build (#191): proves the documentation samples under samples/ actually compile in CI, | |
| # without a live database. Every sample is built with -p:EfcptEnabled=false, which fully | |
| # short-circuits the JD.Efcpt.Build/JD.Efcpt.Sdk generation pipeline (see | |
| # src/JD.Efcpt.Build/buildTransitive/JD.Efcpt.Build.props) so no DB connection, DACPAC query, or | |
| # `efcpt` invocation ever happens - this job only proves the sample *projects* are well-formed | |
| # and reference real, resolvable packages/SDKs, not that generation works end to end (that is | |
| # covered by the integration tests in `pr-checks`). | |
| samples-build: | |
| name: samples-build | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Restore and build library | |
| run: | | |
| dotnet restore JD.Efcpt.Build.sln --use-lock-file | |
| dotnet build JD.Efcpt.Build.sln --configuration Release --no-restore /p:ContinuousIntegrationBuild=true | |
| # Packs the just-built library into ./artifacts (and ./pkg for the JD.Efcpt.Sdk MSBuild SDK), | |
| # which each sample's nuget.config consumes as a local source. These packages carry the | |
| # default 1.0.0 version, and samples reference them via Version="*" - this assumes the | |
| # locally-packed 1.0.0 sorts at or above any version already published to nuget.org. Revisit | |
| # this pin when a real >=1.0 release exists (a future 1.x on nuget.org would out-sort the | |
| # local 1.0.0 and the samples could silently resolve the published package instead). | |
| - name: Pack local NuGet feed consumed by samples | |
| run: | | |
| dotnet pack JD.Efcpt.Build.sln --configuration Release --no-build -o ./artifacts -p:ContinuousIntegrationBuild=true | |
| mkdir -p pkg | |
| cp artifacts/JD.Efcpt.Sdk.*.nupkg pkg/ | |
| # samples/Samples.sln aggregates a stale project reference (simple-sql-integration, removed | |
| # from the repo) and cannot currently be restored as a whole; build each sample | |
| # solution/project individually instead (see samples/README.md for what each demonstrates). | |
| # | |
| # Each restore passes the local packed feed EXPLICITLY via --source (which overrides the | |
| # NuGet.config <packageSources> for the restore) so it never depends on a given sample's | |
| # per-sample nuget.config resolving the right relative path. This is belt-and-suspenders with | |
| # the samples/NuGet.config fix: e.g. sdk-zero-config's nuget.config has no <clear/> and used | |
| # to inherit samples/NuGet.config's bogus "../packages" source -> NU1301. nuget.org is | |
| # included for the samples' EF Core / Aspire / SQL SDK dependencies; the artifacts feed | |
| # (repo root, populated by the Pack step above) supplies JD.Efcpt.Build / JD.Efcpt.Sdk. | |
| - name: Build samples (EfcptEnabled=false - no live DB required) | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| FEED="$GITHUB_WORKSPACE/artifacts" | |
| declare -a SAMPLES=( | |
| "samples/sdk-zero-config/SdkZeroConfigSample.sln" | |
| "samples/dacpac-zero-config/ZeroConfigDacpac.sln" | |
| "samples/microsoft-build-sql-zero-config/ZeroConfigMsBuildSql.sln" | |
| "samples/simple-generation/SimpleGenerationSample.sln" | |
| "samples/msbuild-sdk-sql-proj-generation/SimpleGenerationSample.sln" | |
| "samples/schema-organization/SchemaOrganization.sln" | |
| "samples/custom-renaming/CustomRenaming.sln" | |
| "samples/database-first-sql-generation/DatabaseFirstSqlProj.sln" | |
| "samples/connection-string-sqlite/ConnectionStringSqliteSample.sln" | |
| "samples/connection-string-mssql/ConnectionStringMssql.sln" | |
| "samples/aspnet-core-appsettings/AspNetCoreAppSettings.sln" | |
| "samples/split-data-and-models-between-multiple-projects/SampleApp.slnx" | |
| # Per-provider reference samples (#191): minimal EF Core samples with committed | |
| # generated code for the providers that don't have DACPAC support, so they build | |
| # with -p:EfcptEnabled=false just like the rest of this list. provider-snowflake is | |
| # entities-only (no first-party EF Core runtime provider exists for Snowflake) - see | |
| # samples/provider-snowflake/README.md. | |
| "samples/provider-postgres/ProviderPostgres.sln" | |
| "samples/provider-mysql/ProviderMySql.sln" | |
| "samples/provider-oracle/ProviderOracle.sln" | |
| "samples/provider-firebird/ProviderFirebird.sln" | |
| "samples/provider-snowflake/ProviderSnowflake.sln" | |
| ) | |
| for sample in "${SAMPLES[@]}"; do | |
| echo "::group::Build $sample" | |
| dotnet restore "$sample" \ | |
| --source "https://api.nuget.org/v3/index.json" \ | |
| --source "$FEED" | |
| dotnet build "$sample" --configuration Release --no-restore -p:EfcptEnabled=false | |
| echo "::endgroup::" | |
| done | |
| # NOTE: samples/custom-provider/Acme.Efcpt.Mongo is intentionally NOT built here - it is | |
| # a member of JD.Efcpt.Build.sln and is already compiled by the "Restore and build | |
| # library" step above, so building it again would be redundant. | |
| release: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Restore | |
| run: | | |
| dotnet restore JD.Efcpt.Build.sln --use-lock-file | |
| dotnet tool restore | |
| - name: Install efcpt global tool | |
| run: | | |
| dotnet tool install -g erikej.efcorepowertools.cli --version 10.1.1055 | |
| echo "${HOME}/.dotnet/tools" >> $GITHUB_PATH | |
| - name: Fetch tags | |
| run: git fetch --prune --tags | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v4 | |
| with: | |
| versionSpec: '6.x' | |
| - name: Run GitVersion | |
| id: gitversion | |
| uses: gittools/actions/gitversion/execute@v4 | |
| - name: Set version env vars | |
| run: | | |
| echo "PACKAGE_VERSION=${{ steps.gitversion.outputs.semVer }}" >> $GITHUB_ENV | |
| echo "ASSEMBLY_VERSION=${{ steps.gitversion.outputs.assemblySemVer }}" >> $GITHUB_ENV | |
| echo "FILE_VERSION=${{ steps.gitversion.outputs.assemblySemFileVer }}" >> $GITHUB_ENV | |
| - name: Replace version placeholders in documentation | |
| shell: pwsh | |
| run: | | |
| ./build/replace-version.ps1 -Version "${{ env.PACKAGE_VERSION }}" -Path "." | |
| - name: Build (Release) | |
| run: > | |
| dotnet build JD.Efcpt.Build.sln | |
| --configuration Release | |
| --no-restore | |
| /p:ContinuousIntegrationBuild=true | |
| /p:Version=${{ env.PACKAGE_VERSION }} | |
| /p:AssemblyVersion=${{ env.ASSEMBLY_VERSION }} | |
| /p:FileVersion=${{ env.FILE_VERSION }} | |
| /p:PackageVersion=${{ env.PACKAGE_VERSION }} | |
| - name: Ensure SampleDatabase restored (Release) | |
| run: | | |
| dotnet restore tests/TestAssets/SampleDatabase/Sample.Database.sqlproj | |
| - name: Test with coverage (Release) | |
| run: | | |
| dotnet test JD.Efcpt.Build.sln \ | |
| --configuration Release \ | |
| --no-build \ | |
| /p:EfcptToolMode=tool-manifest \ | |
| --collect:"XPlat Code Coverage" \ | |
| -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura \ | |
| -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Include="[JD.Efcpt.Build*]*" \ | |
| -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Exclude="[*Tests]*" | |
| - name: Pack (all packable projects) | |
| run: > | |
| dotnet pack JD.Efcpt.Build.sln | |
| --configuration Release | |
| --no-build | |
| --output ./artifacts | |
| /p:ContinuousIntegrationBuild=true | |
| /p:IncludeSymbols=${{ env.INCLUDE_SYMBOLS }} | |
| /p:Version=${{ env.PACKAGE_VERSION }} | |
| /p:AssemblyVersion=${{ env.ASSEMBLY_VERSION }} | |
| /p:FileVersion=${{ env.FILE_VERSION }} | |
| /p:PackageVersion=${{ env.PACKAGE_VERSION }} | |
| - name: Upload packages as artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: nuget-packages | |
| path: | | |
| ./artifacts/*.nupkg | |
| ./artifacts/*.snupkg | |
| - name: Upload coverage to Codecov (Release) | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: | | |
| **/TestResults/*/coverage.cobertura.xml | |
| flags: unittests | |
| fail_ci_if_error: false | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Create and push git tag | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| if git ls-remote --exit-code --tags origin "refs/tags/v${PACKAGE_VERSION}" >/dev/null 2>&1; then | |
| echo "Tag v${PACKAGE_VERSION} already exists on remote. Skipping tag push." | |
| else | |
| git tag "v${PACKAGE_VERSION}" | |
| git push origin "v${PACKAGE_VERSION}" | |
| fi | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: v${{ env.PACKAGE_VERSION }} | |
| name: Release v${{ env.PACKAGE_VERSION }} | |
| files: | | |
| ./artifacts/*.nupkg | |
| ./artifacts/*.snupkg | |
| generate_release_notes: true | |
| - name: Push to NuGet.org | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| run: | | |
| if [ -n "$NUGET_API_KEY" ]; then | |
| dotnet nuget push ./artifacts/*.nupkg \ | |
| --api-key "$NUGET_API_KEY" \ | |
| --source https://api.nuget.org/v3/index.json \ | |
| --skip-duplicate | |
| else | |
| echo "Skipping NuGet.org push: API key not set." | |
| fi | |
| - name: Push to GitHub Packages (optional) | |
| run: | | |
| dotnet nuget push "./artifacts/*.nupkg" \ | |
| --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ | |
| --api-key "${{ secrets.GITHUB_TOKEN }}" \ | |
| --skip-duplicate | |
| dotnet nuget push "./artifacts/*.snupkg" \ | |
| --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ | |
| --api-key "${{ secrets.GITHUB_TOKEN }}" \ | |
| --skip-duplicate | |