-
-
Notifications
You must be signed in to change notification settings - Fork 344
57 lines (46 loc) · 1.48 KB
/
test-build.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
name: Test & Build
on:
push:
branches: [ master, devops ]
pull_request:
branches: [ master, devops ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
dotnet-version: [3.1.301]
tests-paths: [./BruteShark/PcapAnalyzerTest, ./BruteShark/PcapProcessorTest]
os: [macOS-latest, ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
tests-paths: ./BruteShark/PcapProcessorTest
include:
- os: macOS-latest
projects-paths: ./BruteShark/BruteSharkCli
test-flag: --no-build
build-flag: ""
- os: ubuntu-latest
projects-paths: ./BruteShark/BruteSharkCli
test-flag: --no-build
build-flag: ""
- os: windows-latest
projects-paths: ./BruteShark
test-flag: ""
build-flag: --no-restore
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore
working-directory: ${{ matrix.projects-paths }}
- name: Test
run: dotnet test --verbosity normal ${{ matrix.test-flag }}
working-directory: ${{ matrix.tests-paths }}
- name: Build
run: dotnet build --configuration Release ${{ matrix.build-flag }}
working-directory: ${{ matrix.projects-paths }}