Skip to content

CoreEx latest. (#53) #149

CoreEx latest. (#53)

CoreEx latest. (#53) #149

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Pull SqlServer
run: docker pull mcr.microsoft.com/mssql/server
- name: Start SqlServer
run: docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" --name sqlserver -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
- name: Pull MySQL
run: docker pull mysql
- name: Start MySQL
run: docker run --name db-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=yourStrong#!Password -d mysql
- name: Pull Postgres
run: docker pull postgres
- name: Start Postgres
run: docker run --name db-postgres -p 5432:5432 -e POSTGRES_PASSWORD=yourStrong#!Password -d postgres
- name: Sleep (allow databases to complete startup)
run: sleep 10
- name: Set EnvVar for Test
run: |
echo "DbEx_ConnectionStrings__NoneDb=Data Source=localhost, 1433;Initial Catalog=DbEx.None;User id=sa;Password=yourStrong(!)Password;TrustServerCertificate=true" >> $GITHUB_ENV
echo "DbEx_ConnectionStrings__ErrorDb=Data Source=localhost, 1433;Initial Catalog=DbEx.Error;User id=sa;Password=yourStrong(!)Password;TrustServerCertificate=true" >> $GITHUB_ENV
echo "DbEx_ConnectionStrings__EmptyDb=Data Source=localhost, 1433;Initial Catalog=DbEx.Empty;User id=sa;Password=yourStrong(!)Password;TrustServerCertificate=true" >> $GITHUB_ENV
echo "DbEx_ConnectionStrings__ConsoleDb=Data Source=localhost, 1433;Initial Catalog=DbEx.Console;User id=sa;Password=yourStrong(!)Password;TrustServerCertificate=true" >> $GITHUB_ENV
echo "DbEx_ConnectionStrings__MySqlDb=Server=localhost; Port=3306; Database=dbex_test; Uid=root; Pwd=yourStrong#!Password;" >> $GITHUB_ENV
echo "DbEx_ConnectionStrings__PostgresDb=Server=localhost; Port=5432; Database=dbex_test; Username=postgres; Pwd=yourStrong#!Password; Pooling=false" >> $GITHUB_ENV
- name: Test
run: dotnet test --no-build --verbosity normal