-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.51 KB
/
build.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
45
46
name: Build Test and Docs
on: [ push, pull_request ]
env:
IS_CI_BUILD: 'true'
SOLUTION_PATH: 'src/Automate.sln'
TESTINGONLY_BUILD_CONFIGURATION: 'Debug'
RELEASE_BUILD_CONFIGURATION: 'Release'
jobs:
build-test:
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore "${{env.SOLUTION_PATH}}"
- name: Build for Release
run: dotnet build "${{env.SOLUTION_PATH}}" --no-restore --configuration ${{env.RELEASE_BUILD_CONFIGURATION}}
- name: Build for Testing
run: dotnet build "${{env.SOLUTION_PATH}}" --no-restore --configuration ${{env.TESTINGONLY_BUILD_CONFIGURATION}}
- name: Unit Test
run: dotnet test --filter Category=Unit "${{env.SOLUTION_PATH}}" --no-build --verbosity normal
- name: Integration Test
run: dotnet test --filter Category=Integration "${{env.SOLUTION_PATH}}" --no-build --verbosity normal
publish-docs:
if: github.ref == 'refs/heads/main'
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Deploy Docs
run: |
pip install mkdocs
pip install mkdocs-material
pip install mkdocs-glightbox
mkdocs gh-deploy --force --clean --verbose