mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-07 07:25:24 +00:00
Run tests in CI (Windows OS only for now)
The reason for such a hack when runing in CI is because we need to make sure we're using higher sequence numbers than any previous times (and even previous runs of the test suite). And we run 1 test only for now, later we will enable more. Other notes: The trick to extract secrets to files was taken from: https://stackoverflow.com/a/59482124/544947 The binary-to-text encoding/decoding was taken from: https://stackoverflow.com/a/42725926/544947 The way to add defines to DefineConstants for MSBuild: https://stackoverflow.com/a/5053070/544947
This commit is contained in:
parent
e304b00089
commit
cec35c6004
5 changed files with 55 additions and 3 deletions
21
.github/workflows/CI.yml
vendored
21
.github/workflows/CI.yml
vendored
|
|
@ -47,4 +47,23 @@ jobs:
|
|||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Build Project
|
||||
run: MSBuild src/TgSharp.sln
|
||||
run: MSBuild src/TgSharp.sln && MSBuild -t:Clean src/TgSharp.sln
|
||||
|
||||
- name: Prepare test suite assets
|
||||
run: |
|
||||
echo "$APP_CONFIG_IN_TESTS" > app.config
|
||||
echo "$SESSION_DAT_IN_TESTS" > encodedSession.dat
|
||||
shell: bash
|
||||
env:
|
||||
APP_CONFIG_IN_TESTS: ${{secrets.APP_CONFIG_IN_TESTS}}
|
||||
SESSION_DAT_IN_TESTS: ${{secrets.SESSION_DAT_IN_TESTS}}
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
MSBuild -p:Configuration=Debug -p:CI=true src/TgSharp.sln
|
||||
|
||||
certutil -decode encodedSession.dat src/TgSharp.Tests.NUnit/bin/Debug/session.dat
|
||||
cp app.config src/TgSharp.Tests.NUnit/bin/Debug/TgSharp.Tests.NUnit.dll.config
|
||||
|
||||
./Nuget.exe install NUnit.Runners -Version 3.11.1 -OutputDirectory packages
|
||||
./packages/NUnit.ConsoleRunner.3.11.1/tools/nunit3-console.exe src/TgSharp.Tests.NUnit/bin/Debug/TgSharp.Tests.NUnit.dll
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue