QD-0 Fix Qsi unit test #268
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" | |
- "fix/**" | |
paths: | |
- "Qsi*/**" | |
- "!Qsi.Debugger/**" | |
pull_request: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: [ self-hosted, querypie ] | |
services: | |
mysql: | |
image: mysql:latest | |
env: | |
MYSQL_USER: root | |
MYSQL_PASSWORD: root | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 33066:3306 | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: 1234 | |
POSTGRES_DB: dvdrental | |
ports: | |
- 54322:5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup MySQL | |
run: docker run --name mysql --detach --env MYSQL_ROOT_PASSWORD=root --publish 33066:3306 mysql | |
- name: Setup Postgres | |
run: docker run --name postgres --detach -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=1234 -e POSTGRES_DB=dvdrental --publish 54322:5432 postgres | |
- name: Setup docker-compose | |
uses: KengoTODA/actions-setup-docker-compose@v1 | |
with: | |
version: '2.14.2' # the full version of `docker-compose` command | |
- 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@v3 | |
with: | |
# Both global.json(Qsi) version and 7.0.x(Qsi.Tests) required | |
global-json-file: global.json | |
dotnet-version: 7.0.x | |
- name: Remove global.json | |
shell: bash | |
run: rm 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 |