Skip to content

Commit

Permalink
Add .NET MAUI CI (#260)
Browse files Browse the repository at this point in the history
* Add .NET MAUI CI

* cleanup

* add ignores

* updae installes

* add no warn
  • Loading branch information
jamesmontemagno authored Mar 27, 2024
1 parent 15be262 commit 05b9ae0
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ name: Playwright Tests for eShop
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'src/ClientApp/**'
- 'test/ClientApp.UnitTests/**'
- '.github/workflows/pr-validation-maui.yml'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'src/ClientApp/**'
- 'test/ClientApp.UnitTests/**'
- '.github/workflows/pr-validation-maui.yml'
jobs:
test:
timeout-minutes: 60
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pr-validation-maui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: eShop Pull Request Validation - .NET MAUI

on:
pull_request:
branches:
- '**'
paths:
- 'src/ClientApp/**'
- 'test/ClientApp.UnitTests/**'
- '.github/workflows/pr-validation-maui.yml'
push:
branches:
- main
paths:
- 'src/ClientApp/**'
- 'test/ClientApp.UnitTests/**'
- '.github/workflows/pr-validation-maui.yml'

jobs:
test:
runs-on: windows-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
shell: pwsh
run: |
dotnet workload install android
dotnet workload install ios
dotnet workload install maccatalyst
dotnet workload install maui
- name: Build
run: dotnet build src/ClientApp/ClientApp.csproj

- name: Test
run: dotnet test tests/ClientApp.UnitTests/ClientApp.UnitTests.csproj
7 changes: 6 additions & 1 deletion .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ on:
pull_request:
paths-ignore:
- '**.md'
- 'src/ClientApp/**'
- 'test/ClientApp.UnitTests/**'
- '.github/workflows/pr-validation-maui.yml'
push:
branches:
- main
paths-ignore:
- '**.md'

- 'src/ClientApp/**'
- 'test/ClientApp.UnitTests/**'
- '.github/workflows/pr-validation-maui.yml'

jobs:
test:
Expand Down
3 changes: 2 additions & 1 deletion src/ClientApp/ClientApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<NoWarn>$(NoWarn);XC0022;XC0023</NoWarn>

<!-- Display name -->
<ApplicationTitle>Northern Mountains</ApplicationTitle>
Expand Down

0 comments on commit 05b9ae0

Please sign in to comment.