diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-24 05:07:13 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-01-24 05:39:16 +0300 |
commit | 538ef5c988ad9fd380cfdbb5890c55dc56d4924d (patch) | |
tree | bcb64900cf935af0c2325370e74ff2cbf0ad6d90 | |
parent | add GitHub workflow (diff) | |
download | winapi-common-538ef5c988ad9fd380cfdbb5890c55dc56d4924d.tar.gz winapi-common-538ef5c988ad9fd380cfdbb5890c55dc56d4924d.zip |
workflows/ci.yml: run unit tests
-rw-r--r-- | .github/workflows/ci.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 647ef48..db83775 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,3 +81,41 @@ jobs: with: name: 'winapi-common-${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.configuration }}' path: '${{ runner.workspace }}/install/' + - name: Make test logs directory + run: mkdir ../test_logs + if: runner.os == 'Windows' + - name: Run unit tests (w/o console tests) + run: | + $args = @( + '--log_level=all', + '--log_sink=..\test_logs\tests.log', + '--report_sink=..\test_logs\report.txt', + '--run_test=!console_tests,process_console_tests', + '--', + '--echo_exe=..\install\bin\winapi-common-test-echo.exe', + '--worker_exe=..\install\bin\winapi-common-test-worker.exe' + ) + ..\install\bin\winapi-common-unit-tests.exe $args + if: runner.os == 'Windows' + - name: Run unit tests (console tests) + run: | + $args = @( + '--log_level=all', + '--log_sink=..\test_logs\tests_console.log', + '--report_sink=..\test_logs\report_console.txt', + '--run_test=console_tests,process_console_tests', + '--', + '--echo_exe=..\install\bin\winapi-common-test-echo.exe', + '--worker_exe=..\install\bin\winapi-common-test-worker.exe' + ) + Start-Process ` + -FilePath ..\install\bin\winapi-common-unit-tests.exe ` + -ArgumentList $args ` + -Wait + if: runner.os == 'Windows' + - name: Upload the test logs + uses: actions/upload-artifact@v2 + with: + name: 'test_logs-${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.configuration }}' + path: '${{ runner.workspace }}/test_logs/' + if: always() && runner.os == 'Windows' |