Skip to content

Merge pull request #37 from Axemasta/chore/net-8 #33

Merge pull request #37 from Axemasta/chore/net-8

Merge pull request #37 from Axemasta/chore/net-8 #33

Workflow file for this run

name: Mocale CI
on:
pull_request:
branches: [ "main" ]
paths:
- 'tests/**'
- 'src/**'
push:
branches: [ "main" ]
paths:
- 'src/**'
- 'version.json'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/doc/cloudbuild.md
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Setup Java JDK
uses: actions/setup-java@v4.0.0
with:
distribution: 'microsoft'
java-version: '11'
architecture: 'x64'
- name: Install Maui Workloads
run: dotnet workload install maui --source https://api.nuget.org/v3/index.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage"
if: github.event_name == 'pull_request'
- name: Publish Code Coverage To PR
uses: 5monkeys/cobertura-action@v13
with:
path: tests/Mocale.UnitTests/TestResults/*/coverage.cobertura.xml
minimum_coverage: 5
show_line: true
show_branch: true
show_missing: true
if: github.event_name == 'pull_request'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: drop
path: src/**/*.nupkg
if: github.event_name != 'pull_request'