-
Notifications
You must be signed in to change notification settings - Fork 318
44 lines (33 loc) · 1.06 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This workflow will run build and unit test on every PR raised.
name: "Build and Run Unit Test on PR"
on:
pull_request:
branches: [ "main" ]
env:
CUSTOMER_PROJECT: './src/CustomerSite/CustomerSite.csproj'
PUBLISHER_PROJECT: './src/AdminSite/AdminSite.csproj'
SERVICES_TEST_PROJECT: './src/Services.Test/Services.Test.csproj'
DOTNET_CORE_VERSION: '8.0.303'
jobs:
BuildApps:
name: Build Apps
runs-on: ubuntu-latest
steps:
# Checkout the repo
- uses: actions/checkout@main
# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
# Run dotnet build and publish
- name: Build app
run: |
dotnet build ${{ env.CUSTOMER_PROJECT }} --configuration Release
# Run dotnet build and publish
- name: Build app
run: |
dotnet build ${{ env.PUBLISHER_PROJECT }} --configuration Release
# Run unit tests
- name: Unit Test
run: dotnet test ${{ env.SERVICES_TEST_PROJECT }}