-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (69 loc) · 1.94 KB
/
dotnet.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
name: Builds the entire solution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore .NET dependencies
working-directory: ./src
run: dotnet restore
- name: Build
working-directory: ./src
run: dotnet build --no-restore
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: buildArtifact
path: ./src
retention-days: 7
tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/download-artifact@v4
with:
name: buildArtifact
path: ./src
- name: Test
working-directory: ./src/NodeDev.Tests
run: dotnet test --no-build --verbosity normal
e2e-tests:
name: Run End To End Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/download-artifact@master
with:
name: buildArtifact
path: ./src
- name: Build Necessary for Playwright
working-directory: ./src/NodeDev.EndToEndTests
run: dotnet build
- name: Ensure browsers are installed
run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net8.0/playwright.ps1 install --with-deps
- name: Test
working-directory: ./src/NodeDev.EndToEndTests
run: dotnet test --no-build --verbosity normal