-
-
Notifications
You must be signed in to change notification settings - Fork 17
61 lines (58 loc) · 1.96 KB
/
unit_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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Unit tests
on: push
jobs:
linux:
name : Unit tests for Linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate unittests binary
uses: Yadoms/build-yadoms-action@v4.0.1
id: yadoms_build_step
with:
buildImage: ghcr.io/yadoms/build_for_linux:latest
registry: ghcr.io
username: ${{ secrets.CONTAINER_GH_LOGIN }}
password: ${{ secrets.CONTAINER_GH_TOKEN }}
entrypoint: 'sh /work/build-scripts/linux/entrypoint_docker_unittests.sh'
- name: Archive unittests artifacts
uses: actions/upload-artifact@v2
with:
name: Linux-UnitTests
path: ./tests/unit/builds
- name: Run unit tests
run: |
echo "Running unittests for yadoms ${{ steps.yadoms_build_step.outputs.yadomsVersion }}"
cd tests/unit/builds
./yadomsTests
Windows:
name : Run Unit tests for Windows
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Yadoms build script
uses: Yadoms/build-yadoms-windows-action@v2.0.1
id: yadoms_build_step
with:
buildImage: ghcr.io/yadoms/build_for_windows:latest
registry: ghcr.io
username: ${{ secrets.CONTAINER_GH_LOGIN }}
password: ${{ secrets.CONTAINER_GH_TOKEN }}
entrypoint: 'powershell.exe -Command C:\work\build-scripts\windows\entrypoint_docker_unittests.ps1'
- name: Archive unittests artifacts
uses: actions/upload-artifact@v2
with:
name: Windows-UnitTests
path: ./tests/unit/builds
- name: Run Unit tests for Windows
shell: cmd
run: |
cd tests/unit/builds/RELEASE
yadomsTests.exe -r detailed -e results.txt
- name: Archive unittests report artifacts
uses: actions/upload-artifact@v2
with:
name: Windows-UnitTests-Report
path: ./tests/unit/builds/RELEASE/results.txt