-
Notifications
You must be signed in to change notification settings - Fork 267
70 lines (60 loc) · 1.97 KB
/
dotnet-core.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
# Copyright 2020 Chris Morgan <chmorgan@gmail.com>
# SPDX-License-Identifier: MIT
name: .NET Core
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Install .net dependencies
run: dotnet restore
- name: Install libpcap
run: sudo -E bash scripts/install-libpcap.sh
- name: Install tap
run: sudo -E bash scripts/install-tap.sh
- name: Build sharppcap assembly
run: dotnet build SharpPcap/SharpPcap.csproj
- name: Test
run: sudo -E bash scripts/test.sh
- run: sudo chmod -R +r Test/TestResults
if: always()
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: Test/TestResults/TestResults.xml
- uses: actions/upload-artifact@v4
if: failure()
with:
name: artifacts
path: Test/TestResults/
- name: publish on version change
id: publish_nuget
uses: alirezanet/publish-nuget@v3.1.0
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: SharpPcap/SharpPcap.csproj
# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
INCLUDE_SYMBOLS: true
license-check:
# We use https://github.com/fsfe/reuse-tool to ensure EVERY file has correct license and copyright info
# Either in the file itself, or in .reuse\dep5 for binary files and files that don't support comments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install -r requirements.txt
- run: reuse lint