Skip to content

Commit 9affd62

Browse files
Adding unit tests
1 parent 391de9f commit 9affd62

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/basket-api.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
env:
2222
SERVICE: basket-api
2323
IMAGE: basket.api
24+
DOTNET_VERSION: 5.0.x
2425

2526
jobs:
2627

@@ -45,6 +46,20 @@ jobs:
4546
steps:
4647
- name: 'Checkout Github Action'
4748
uses: actions/checkout@master
49+
50+
- name: Setup dotnet
51+
uses: actions/setup-dotnet@v1
52+
with:
53+
dotnet-version: ${{ env.DOTNET_VERSION }}
54+
55+
- name: Build and run unit tests
56+
run: |
57+
dotnet restore "eShopOnContainers-ServicesAndWebApps.sln"
58+
cd /src/Services/Catalog/Catalog.API
59+
dotnet build --no-restore
60+
cd -
61+
cd src/Services/Catalog/Catalog.UnitTests
62+
dotnet test
4863
4964
- name: Enable experimental features for the Docker daemon and CLI
5065
run: |

0 commit comments

Comments
 (0)