-
Notifications
You must be signed in to change notification settings - Fork 21
73 lines (59 loc) · 1.98 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build
on:
push:
# If the build was triggered due to a tag that starts with 'v', consider it a tagged release
env:
IS_TAGGED_RELEASE: ${{startsWith(github.ref, 'refs/tags/v')}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.414
- name: Build
env:
# Override package name if PACKAGE_ID secret is defined.
# If PACKAGE_ID secret is not defined, IO.Eventuate.Tram will be used.
PACKAGE_ID: ${{secrets.PACKAGE_ID}}
run: ./build.sh
- name: Upload bin folder
uses: actions/upload-artifact@v3
with:
name: bin
path: IO.Eventuate.Tram/bin
- name: Unit Tests
run: dotnet test -c Release --no-build --verbosity normal --logger trx IO.Eventuate.Tram.UnitTests/
- name: Upload unit test results
uses: actions/upload-artifact@v3
if: always()
with:
name: unit-test-results
path: IO.Eventuate.Tram.UnitTests/TestResults
- name: Integration Tests
working-directory: ./IO.Eventuate.Tram.IntegrationTests
env:
CDC_SERVICE_DOCKER_VERSION: 0.6.0.RELEASE
run: ./test.sh
- name: Print docker status
if: always()
run: |
docker ps
docker stats --no-stream --all
- name: Upload integration test results
uses: actions/upload-artifact@v3
if: always()
with:
name: integration-test-results
path: IO.Eventuate.Tram.IntegrationTests/bin/Release/net6.0/TestResults
- name: Publish nuget package
# Don't publish nuget packages for builds triggered by pull requests (pull requests from forks won't have access to secrets anyway)
if: github.event_name != 'pull_request'
env:
NUGET_PUBLISH_URL: ${{secrets.NUGET_PUBLISH_URL}}
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
run: |
./publish-artifacts.sh