QD-0 Fix Qsi unit test #255
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: QSI Unit Tests | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "Qsi*/**" | |
- "!Qsi.Debugger/**" | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0.27 | |
env: | |
MYSQL_USER: root | |
MYSQL_PASSWORD: root | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup MySQL | |
run: sudo /etc/init.d/mysql start | |
- name: Setup DynamoDB | |
run: docker-compose -f "./Qsi.Tests/Vendor/PrimarSql/docker-compose.yml" up -d | |
- name: Setup .NET | |
id: setup-dotnet | |
uses: actions/setup-dotnet@v2 | |
with: | |
# Both global.json(Qsi) version and 7.0.x(Qsi.Tests) required | |
global-json-file: global.json | |
dotnet-version: 7.0.x | |
- name: Create temporary global.json | |
shell: bash | |
run: | | |
echo '{"sdk":{"version": "${{ steps.setup-dotnet.outputs.dotnet-version }}"}}' > ./global.json | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "corretto" | |
java-version: "17" | |
- name: Setup QSI | |
shell: pwsh | |
run: ./Setup.ps1 | |
- name: Restore dependencies | |
run: dotnet restore Qsi.Tests | |
- name: Build | |
run: dotnet build Qsi.Tests --no-restore | |
- name: Test | |
run: dotnet test Qsi.Tests --no-build --verbosity normal |