-
Notifications
You must be signed in to change notification settings - Fork 43
50 lines (43 loc) · 1.14 KB
/
unit.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
name: .NET Unit CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test:
strategy:
matrix:
dotnet: [ "6.0.x" ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
# Avoid unnecessary output
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
aka.ms:443
api.nuget.org:443
builds.dotnet.microsoft.com:443
github.com:443
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Clear NuGet cache
run: dotnet nuget locals all --clear
- name: Build and unit test
shell: bash
run: ./build.sh