Adding unit tests

This commit is contained in:
Colin Dembovsky 2021-04-15 10:24:28 -05:00
parent e858b1af51
commit 53ad2d19c3

View File

@ -21,6 +21,7 @@ on:
env: env:
SERVICE: basket-api SERVICE: basket-api
IMAGE: basket.api IMAGE: basket.api
DOTNET_VERSION: 5.0.x
jobs: jobs:
@ -46,6 +47,20 @@ jobs:
- name: 'Checkout Github Action' - name: 'Checkout Github Action'
uses: actions/checkout@master uses: actions/checkout@master
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build and run unit tests
run: |
dotnet restore "eShopOnContainers-ServicesAndWebApps.sln"
cd /src/Services/Catalog/Catalog.API
dotnet build --no-restore
cd -
cd src/Services/Catalog/Catalog.UnitTests
dotnet test
- name: Enable experimental features for the Docker daemon and CLI - name: Enable experimental features for the Docker daemon and CLI
run: | run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json