-
Notifications
You must be signed in to change notification settings - Fork 24
98 lines (88 loc) · 4 KB
/
build-and-test.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
on:
push:
branches:
- dev
- future
tags:
- v[0-9]+.[0-9]+.[0-9]+ # Matches all semantic versioning tags with major, minor, patch
pull_request:
branches:
- dev
- future
env:
dotnet_sdk_version: '8.0.100'
REPOSITORY_NAME: ${{ github.event.repository.name }}
MORYX_PACKAGE_TARGET_DEV: 'https://www.myget.org/F/moryx-oss-ci/api/v2/package'
MORYX_PACKAGE_TARGET_V3_DEV: 'https://www.myget.org/F/moryx-oss-ci/api/v3/index.json'
MORYX_PACKAGE_TARGET_FUTURE: 'https://www.myget.org/F/moryx-oss-ci/api/v2/package'
MORYX_PACKAGE_TARGET_V3_FUTURE: 'https://www.myget.org/F/moryx-oss-ci/api/v3/index.json'
MORYX_PACKAGE_TARGET_RELEASE: 'https://api.nuget.org/v3/index.json'
MORYX_PACKAGE_TARGET_V3_RELEASE: 'https://api.nuget.org/v3/index.json'
jobs:
EnvVar:
runs-on: ubuntu-latest
steps:
- run: echo ""
outputs:
dotnet_sdk_version: ${{ env.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }}
MORYX_PACKAGE_TARGET_DEV: ${{ env.MORYX_PACKAGE_TARGET_DEV }}
MORYX_PACKAGE_TARGET_V3_DEV: ${{ env.MORYX_PACKAGE_TARGET_V3_DEV }}
MORYX_PACKAGE_TARGET_FUTURE: ${{ env.MORYX_PACKAGE_TARGET_FUTURE }}
MORYX_PACKAGE_TARGET_V3_FUTURE: ${{ env.MORYX_PACKAGE_TARGET_V3_FUTURE }}
MORYX_PACKAGE_TARGET_RELEASE: ${{ env.MORYX_PACKAGE_TARGET_RELEASE }}
MORYX_PACKAGE_TARGET_V3_RELEASE: ${{ env.MORYX_PACKAGE_TARGET_V3_RELEASE }}
Build:
needs: [EnvVar]
uses: phoenixcontact/tools/.github/workflows/build-tool.yml@main
with:
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
UnitTests:
needs: [EnvVar, Build]
uses: phoenixcontact/tools/.github/workflows/unittest-tool.yml@main
with:
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
IntegrationTests:
needs: [EnvVar, Build]
uses: phoenixcontact/tools/.github/workflows/integrationtest-tool.yml@main
with:
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
ReportGenerator:
needs: [EnvVar, UnitTests, IntegrationTests]
uses: phoenixcontact/tools/.github/workflows/reportgenerator-tool.yml@main
with:
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
Publish-Test-Coverage:
needs: [EnvVar, ReportGenerator]
uses: phoenixcontact/tools/.github/workflows/publish-test-coverage-tool.yml@main
with:
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# currently not working
# Documentation:
# needs: [EnvVar, UnitTests]
# uses: phoenixcontact/tools/.github/workflows/documentation-tool.yml@main
# with:
# REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
Publish:
needs: [EnvVar, UnitTests]
uses: phoenixcontact/tools/.github/workflows/publish-tool.yml@main
with:
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
MORYX_PACKAGE_TARGET_DEV: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_DEV }}
MORYX_PACKAGE_TARGET_V3_DEV: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_DEV }}
MORYX_PACKAGE_TARGET_FUTURE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_FUTURE }}
MORYX_PACKAGE_TARGET_V3_FUTURE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_FUTURE }}
MORYX_PACKAGE_TARGET_RELEASE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_RELEASE }}
MORYX_PACKAGE_TARGET_V3_RELEASE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_RELEASE }}
secrets:
MYGET_TOKEN: ${{secrets.MYGET_TOKEN}}
NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}