forked from DbUp/DbUp
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.65 KB
/
test-code.yml
File metadata and controls
60 lines (51 loc) · 1.65 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Test Code
on:
pull_request:
branches:
- develop
- master
push:
branches:
- develop
- master
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # all
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Install SQL CE 📅
shell: powershell
run: ./install-sql-ce.ps1
- name: Cake Build 🏗️
id: cake-build
shell: powershell
run: ./build.ps1
env:
OCTOVERSION_CurrentBranch: ${{ github.ref }}
AssentNonInteractive: true
- name: "Create Draft Release"
if: ${{ format('{0}', github.ref_name) == 'master' && format('{0}', env.GITHUB_TOKEN) != '' }}
shell: pwsh
working-directory: artifacts
# Can't just use wildcard in this command due to https://github.com/cli/cli/issues/5099 so use Get-Item
run: gh release create --draft --title "${{ steps.cake-build.outputs.Version_Info_SemVer }}" "${{ steps.cake-build.outputs.Version_Info_SemVer }}" (Get-Item *.nupkg)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test Report 🧪
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Tests
path: artifacts/TestResults/*.trx
reporter: dotnet-trx