-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (39 loc) · 1.18 KB
/
buildandtest.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
name: Build and Test
on:
workflow_dispatch:
push:
branches: [ dev ]
paths-ignore:
- "**.md"
- "**.ps1"
- ".editorconfig"
- "TestFiles/*"
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/*.yml'
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened] # Only run when PR is created or updated
jobs:
build:
name: Build and Test
# use ubuntu-latest image to run steps on
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.event.pull_request == null # Prevents duplicate runs
steps:
# uses GitHub's checkout action to checkout code form the release branch
- name: Checkout code
uses: actions/[email protected]
# sets up .NET SDK
- name: Setup .NET
uses: actions/[email protected]
with:
global-json-file: ./global.json
- name: Install WASM workload
run: dotnet workload install wasm-tools
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test --configuration Release --no-build