-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (62 loc) · 2.69 KB
/
WeeklyBuildAndTest.yml
File metadata and controls
80 lines (62 loc) · 2.69 KB
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
name: Weekly Build and Test
# PREREQUISITES FOR PUSH-BACK OF TEST RESULTS
# Please note: test project usually required nuget package JUnitTestLogger
# to be able to provide JUnit compatible test results XML file (required
# for pushing back details on succeeded/failed tests)
#
# NuGet install command:
# - Install-Package JUnitTestLogger
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Run every week on sunday to test Scopevisio API and CenterDevice API
schedule:
- cron: "0 23 * * 6"
env:
# Path to the solution file relative to the root of the project
SOLUTION_FILE_PATH: .
# Configuration type to build
BUILD_CONFIGURATION: CI_CD
BUILD_OUTPUT: CenterDevice.Rest/bin/CI_CD
BUILD_OUTPUT_TEST: CenterDevice.Rest.Test/bin/CI_CD
jobs:
test:
#needs: build
# Prevent concurrent job runners changing the very same data on the remote DMS test server
concurrency: teamwork_test_server
runs-on: ubuntu-latest
strategy:
# test mights fail in run simultaneously because of preparation and cleanup of test file on the very same DMS space
max-parallel: 1
fail-fast: true
env:
RESULTS_PATH: TestResults.xml
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
TEST_CUSTOMERNO: ${{ secrets.TEST_CUSTOMERNO }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Dir Listing (Linux)
run: ls -la
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration=${{env.BUILD_CONFIGURATION}} --no-restore
- name: Run Unit Tests - .NET 8.0
run: dotnet test --framework net8.0 --results-directory test-results-net8.0 --logger junit --configuration=${{env.BUILD_CONFIGURATION}} --no-restore
- name: Publish Unit Test Results (Linux) - NET 8.0
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: "test-results-net8.0/TestResults.xml"
check_run_annotations: all tests
comment_title: Unit Test Statistics (Ubuntu) - NET 8.0
check_name: Unit Test Results (Ubuntu) - NET 8.0
report_individual_runs: true