-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (49 loc) · 1.35 KB
/
ci.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
name: ci
on:
push:
branches: [master, release-*]
pull_request:
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
ci:
strategy:
fail-fast: false
matrix:
job:
- name: ubuntu
os: ubuntu-22.04
- name: windows
os: windows-2022
name: ${{ matrix.job.name }}
runs-on: ${{ matrix.job.os }}
steps:
- name: Set PR number (Linux)
run: |
echo "PRNumber=${{ github.event.pull_request.number }}" >> "$GITHUB_ENV"
if: matrix.job.name == 'ubuntu'
- name: Set PR number (Windows)
run: |
echo ("PRNumber=${{ github.event.pull_request.number }}") >> $env:GITHUB_ENV
if: matrix.job.name == 'windows'
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.424
7.0.410
8.0.303
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal DMISharp.Tests/DMISharp.Tests.csproj --logger GitHubActions
- if: matrix.job.name == 'ubuntu'
uses: actions/upload-artifact@v3
with:
name: NuGet packages
path: ./**/*.nupkg