image: mcr.microsoft.com/dotnet/sdk:5.0

before_script:
    - dotnet restore Exemples_coreOnly.sln
 
build:
    stage: build
    tags:
        - docker
    script:
        - dotnet build Exemples_coreOnly.sln -c Release --no-restore
        - dotnet publish Exemples_coreOnly.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
    artifacts:
        paths:
            - $CI_PROJECT_DIR/build/release
test:
    stage: test
    tags:
        - docker
    script:
        - cd  ./p08_BDD_EntityFramework/ex_041_004_UnitTests_w_InMemory
        - dotnet test --no-restore 
        - cd  ../..
        - cd ./p08_BDD_EntityFramework/ex_041_004_UnitTests_w_SQLiteInMemory
        - dotnet test --no-restore
