Skip to content

v3.18.0

v3.18.0 #349

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
# ubuntu-18.04 # cosmos emulator doesn't work on ubuntu 20 and 22: https://github.com/Qayme/qayme-action-cosmosdb-emulator
services:
# cosmos: # tests fail when cosmos has less than 4 CPUs assigned, but github free runners have only 2
# image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator
# ports:
# - 8081:8081
# - 10251:10251
# - 10252:10252
# - 10253:10253
# - 10254:10254
# env:
# AZURE_COSMOS_EMULATOR_PARTITION_COUNT: 20
# AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: false
# options: -m 4g --cpus=2.0
sql:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: sAPWD23.^0
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --filter "(TestCategory!=WithDB)&(TestCategory!=WithCosmos)&(TestCategory!=WithSolace)" --no-build --verbosity normal /p:CollectCoverage=true /p:Exclude="[CoreEx.TestFunction]*" /p:CoverletOutputFormat=lcov /p:CoverletOutput=./coverage/lcov.info
- name: Set EnvVar for Test
run: |
echo "ConnectionStrings__Database=Data Source=localhost,1433;Initial Catalog=My.Hr;User id=sa;Password=sAPWD23.^0;TrustServerCertificate=true" >> $GITHUB_ENV
- name: Create/Migrate DB
run: dotnet run all --project ./samples/My.Hr/My.Hr.Database --connection-varname ConnectionStrings__Database
- name: Test With DB
run: dotnet test --filter TestCategory=WithDB --no-build --verbosity normal /p:CollectCoverage=true /p:Exclude="[CoreEx.TestFunction]*" /p:CoverletOutputFormat=lcov /p:CoverletOutput=./coverage/lcov2.info
- name: Test With Cosmos DB TestCategory=WithCosmos
run: dotnet test --filter Category=WithCosmos --no-build --verbosity normal /p:CollectCoverage=true /p:Exclude="[CoreEx.TestFunction]*" /p:CoverletOutputFormat=lcov /p:CoverletOutput=./coverage/lcov3.info
if: ${{ false }}
#- name: Test Docker Build
# run: docker-compose -f docker-compose.myHr.yml -f docker-compose.myHr.override.yml build --build-arg LOCAL=true