-
Notifications
You must be signed in to change notification settings - Fork 60
95 lines (76 loc) · 4.09 KB
/
LinuxTest-2.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Ginger Linux Test
on:
workflow_dispatch:
workflow_call:
jobs:
build:
name: Linux Test
runs-on: ubuntu-latest
env:
BUILD_CONFIGURATION: Release
steps:
# ------------------------------------------------------------------------------------------------------
# Copy Ginger repo
# ------------------------------------------------------------------------------------------------------
- name: Code Checkout
if: ${{github.workflow == 'Ginger Linux Test'}}
uses: actions/checkout@v3
- name: Restore static site content
if: ${{github.workflow != 'Ginger Linux Test'}}
uses: actions/[email protected]
with:
path: ./**
key: cache-site-${{ github.run_number }}
enableCrossOsArchive:
true
# ------------------------------------------------------------------------------------------------------
# Install .Net core SDK 8.0.100
# ------------------------------------------------------------------------------------------------------
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.100'
# ------------------------------------------------------------------------------------------------------
# start Testing
# ------------------------------------------------------------------------------------------------------
- name: 'Testing GingerUtilsTest'
run: dotnet test Ginger/GingerUtilsTest --configuration ${BUILD_CONFIGURATION} --logger trx --verbosity=normal
- name: 'Testing GingerCoreCommonTest'
run: dotnet test Ginger/GingerCoreCommonTest --configuration ${BUILD_CONFIGURATION} --logger trx --verbosity=normal
# for GingerCoreNET we use run setting to limit to have one worker thread due to workspace limitation
- name: 'Testing GingerCoreNETUnitTest'
run: dotnet test Ginger/GingerCoreNETUnitTest --configuration ${BUILD_CONFIGURATION} --logger trx --verbosity=normal
- name: 'Testing GingerPluginCoreTest'
run: dotnet test Ginger/GingerPluginCoreTest --configuration ${BUILD_CONFIGURATION} --logger trx --verbosity=normal
- name: 'Testing GingerConsoleTest'
run: dotnet test Ginger/GingerConsoleTest --configuration ${BUILD_CONFIGURATION} --logger trx --verbosity=normal
- name: 'Testing GingerAutoPilotTest'
run: dotnet test Ginger/GingerAutoPilotTest --configuration ${BUILD_CONFIGURATION} --logger trx --verbosity=normal
# ------------------------------------------------------------------------------------------------------
# Publish GingerRuntime
# ------------------------------------------------------------------------------------------------------
- name: 'Publish GingerRuntime'
if: ${{github.event_name == 'Ginger Linux Test' }}
run: dotnet publish Ginger/GingerRuntime -c Release
# ------------------------------------------------------------------------------------------------------
# Publish Test Results
# ------------------------------------------------------------------------------------------------------
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Ginger Linux UnitTests # Name of the check run which will be created
path: "**/*.trx" # Path to test results
reporter: dotnet-trx # Format of test results
# ------------------------------------------------------------------------------------------------------
# Run Standalone CLI Test
# ------------------------------------------------------------------------------------------------------
- name: Run Standalone CLI Test
if: success() || failure() # run this step even if previous step failed
shell: bash
run: |
pwd
ls -alt
chmod +x CLITestsGithub.sh
sudo apt install dos2unix
dos2unix -b CLITestsGithub.sh
./CLITestsGithub.sh