-
-
Notifications
You must be signed in to change notification settings - Fork 30
87 lines (75 loc) · 2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: build
on:
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
pull_request:
branches:
- main
- dotnet-vnext
- dotnet-nightly
workflow_dispatch:
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
FORCE_COLOR: 1
NUGET_XMLDOC_MODE: skip
TERM: xterm
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
os-name: macos
- os: ubuntu-latest
os-name: linux
- os: windows-latest
os-name: windows
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
- name: Build, Test and Publish
shell: pwsh
run: ./build.ps1
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
- uses: codecov/codecov-action@v4
name: Upload coverage to Codecov
with:
files: ./artifacts/coverage.cobertura.xml,./src/TodoApp/coverage/lcov.info
flags: ${{ matrix.os-name }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: Publish screenshots
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: screenshots-${{ matrix.os-name }}
path: ./artifacts/screenshots/*.png
if-no-files-found: ignore
- name: Publish traces
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: traces-${{ matrix.os-name }}
path: ./artifacts/traces/*
if-no-files-found: ignore
- name: Publish videos
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: videos-${{ matrix.os-name }}
path: ./artifacts/videos/*
if-no-files-found: ignore