-
Notifications
You must be signed in to change notification settings - Fork 187
41 lines (40 loc) · 1.48 KB
/
run_tests.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
name: Run API tests
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Install fonts
run: dism /online /enable-feature /featurename:ServerCoreFonts-NonCritical-Fonts-TrueType /Source:O:\ /LimitAccess
- name: Build ENV
run: mkdir ./Examples/Data/License/
- name: Add total license
uses: timheuer/[email protected]
with:
fileName: 'Aspose.Total.NET.lic'
fileDir: './Examples/Data/License/'
encodedString: ${{ secrets.API_LICENSE }}
- name: Add words license
uses: timheuer/[email protected]
with:
fileName: 'Aspose.Words.NET.lic'
fileDir: './Examples/Data/License/'
encodedString: ${{ secrets.API_WORDS_LICENSE }}
- name: Restore dependencies
run: dotnet restore ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Build
run: dotnet build --no-restore ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Test
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults" ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: TestResults
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}