Skip to content

Commit

Permalink
Add PR validation GitHub Action (#81)
Browse files Browse the repository at this point in the history
* Add PR validation GitHub Action

* Use version in global.json for GitHub action

* Update step name

* Add workload update step

* Reset NuGet.config

* Update Microsoft.Extensions.Http.Resilience version

* Use standard nuget.config

* Update Directory.Packages.props
  • Loading branch information
captainsafia authored Nov 14, 2023
1 parent b53ac6a commit 979e707
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 58 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: eShop Pull Request Validation

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- main
paths-ignore:
- '**.md'


jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET (global.json)
uses: actions/setup-dotnet@v3
- name: Update Workloads
run: dotnet workload update
- name: Install Workloads
run: dotnet workload install aspire
- name: Build
run: dotnet build eShop.Web.slnf
- name: Test
run: dotnet test eShop.Web.slnf
5 changes: 3 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<AspnetVersion>8.0.0</AspnetVersion>
<MicrosoftExtensionsVersion>8.0.0</MicrosoftExtensionsVersion>
<EfVersion>8.0.0</EfVersion>
<RuntimeVersion>8.0.0</RuntimeVersion>
<AspireVersion>8.0.0-preview.1.23557.2</AspireVersion>
Expand All @@ -25,15 +26,15 @@
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0-rc.2.23480.2" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="$(AspnetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.0.0-rtm.23524.3" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="$(MicrosoftExtensionsVersion)" />
<!-- Version together with EF -->
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="$(EfVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="$(EfVersion)" />
Expand Down
56 changes: 0 additions & 56 deletions NuGet.config

This file was deleted.

8 changes: 8 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>

0 comments on commit 979e707

Please sign in to comment.