Skip to content

Commit 54dc2ac

Browse files
feat!: Rebuild all pipeline templates (#237)
* refactor: Removed Submodules and local pipelines * refactor: Added submodules in new structure * chore: Created template `build-dotnet-single` and added `local-testproject-healthchecks` * fix: Added missing inheritence of secrets * fix(typo): Removed unnecessary char * fix(permissions): Added missing permissions * chore: Reduced names * chore: tests require `commitlinter` as dependency * chore: Added template `build-dotnet-matrix.yml` * fix(typo): Renamed pipeline to the testproject * chore: Simplified `step-dotnet-tests.yml` * fix: Potential fix for code scanning alert no. 64: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Martin Stühmer <[email protected]> * fix: Potential fix for code scanning alert no. 65: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Martin Stühmer <[email protected]> * fix: Updated permissions * chore: Added windows testproject * chore: Disable test execution on windows for `archiduct` * chore(submodule): Updated submodules * fix: Removed wrong submodule reference * fix: `disableCodeFormat` for testproject hosting.winforms * chore: Added `failFast` for matrix * fix: Matrix concurrency * chore: Added `build-dotnet-fast.yml` * chore: Failed old pipelines --------- Signed-off-by: Martin Stühmer <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 6c2f5fb commit 54dc2ac

14 files changed

+524
-210
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
disableCodeFormat:
5+
required: false
6+
type: boolean
7+
default: false
8+
disableCodeQL:
9+
required: false
10+
type: boolean
11+
default: false
12+
disableCoverageUpload:
13+
required: false
14+
type: boolean
15+
default: false
16+
dotnetLogging:
17+
required: false
18+
type: string
19+
default: minimal
20+
dotnetVersion:
21+
required: false
22+
type: string
23+
default: |
24+
8.x
25+
9.x
26+
dotnetQuality:
27+
required: false
28+
type: string
29+
default: ga
30+
enableCleanUpDockerDocker:
31+
required: false
32+
type: boolean
33+
default: false
34+
runsOnBuild:
35+
required: false
36+
type: string
37+
default: 'ubuntu-latest'
38+
solution:
39+
required: true
40+
type: string
41+
secrets:
42+
FETCH_TOKEN:
43+
required: false
44+
45+
concurrency:
46+
group: ${{ github.workflow_ref }}@${{ github.ref }}-build-fast
47+
cancel-in-progress: true
48+
49+
env:
50+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
51+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
52+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
53+
DOTNET_NOLOGO: true
54+
55+
permissions:
56+
actions: read
57+
contents: read
58+
pull-requests: write
59+
security-events: write
60+
61+
jobs:
62+
commitlinter:
63+
name: Commit Linter
64+
uses: ./.github/workflows/step-node-commitlint.yml
65+
secrets: inherit
66+
67+
build:
68+
name: Build and Test
69+
needs:
70+
- commitlinter
71+
runs-on: ${{ inputs.runsOnBuild || 'ubuntu-latest' }}
72+
steps:
73+
- name: Checkout repository
74+
uses: actions/[email protected]
75+
with:
76+
fetch-depth: 0
77+
submodules: recursive
78+
token: ${{ secrets.FETCH_TOKEN || github.token }}
79+
80+
- name: Setup .NET
81+
uses: actions/[email protected]
82+
with:
83+
dotnet-version: ${{ inputs.dotnetVersion || '8.x' }}
84+
dotnet-quality: ${{ inputs.dotnetQuality || 'ga' }}
85+
86+
- name: NuGet cache
87+
uses: actions/[email protected]
88+
with:
89+
path: ~/.nuget/packages
90+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
91+
restore-keys: |
92+
${{ runner.os }}-nuget-
93+
94+
- name: Restore dependencies
95+
run: dotnet restore ${{ inputs.solution }} --verbosity ${{ inputs.dotnetLogging || 'minimal' }}
96+
97+
- name: Build solution
98+
run: dotnet build ${{ inputs.solution }} -v ${{ inputs.dotnetLogging || 'minimal' }} -c Release --no-restore /p:GeneratePackageOnBuild=false
99+
100+
- name: Test
101+
run: |
102+
dotnet test ${{ inputs.solution }} -c Release -v ${{ inputs.dotnetLogging || 'minimal' }} --no-build --no-restore
103+
104+
dependabot:
105+
name: Dependabot Merge
106+
if: ${{ !cancelled() && !failure() && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
107+
uses: ./.github/workflows/step-dependabot-merge.yml
108+
needs:
109+
- build
110+
secrets: inherit
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
disableCodeFormat:
5+
required: false
6+
type: boolean
7+
default: false
8+
disableCodeQL:
9+
required: false
10+
type: boolean
11+
default: false
12+
disableCoverageUpload:
13+
required: false
14+
type: boolean
15+
default: false
16+
disableTestsOnLinux:
17+
required: false
18+
type: boolean
19+
default: false
20+
disableTestsOnMacOs:
21+
required: false
22+
type: boolean
23+
default: false
24+
disableTestsOnWindows:
25+
required: false
26+
type: boolean
27+
default: false
28+
dotnetLogging:
29+
required: false
30+
type: string
31+
default: minimal
32+
dotnetVersion:
33+
required: false
34+
type: string
35+
default: |
36+
8.x
37+
9.x
38+
dotnetQuality:
39+
required: false
40+
type: string
41+
default: ga
42+
enableCleanUpDockerDocker:
43+
required: false
44+
type: boolean
45+
default: false
46+
failFast:
47+
required: false
48+
type: boolean
49+
default: true
50+
runsOnBuild:
51+
required: false
52+
type: string
53+
default: 'ubuntu-latest'
54+
solution:
55+
required: true
56+
type: string
57+
secrets:
58+
FETCH_TOKEN:
59+
required: false
60+
61+
concurrency:
62+
group: ${{ github.workflow_ref }}@${{ github.ref }}-build-matrix
63+
cancel-in-progress: true
64+
65+
env:
66+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
67+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
68+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
69+
DOTNET_NOLOGO: true
70+
71+
permissions:
72+
actions: read
73+
contents: read
74+
pull-requests: write
75+
security-events: write
76+
77+
jobs:
78+
commitlinter:
79+
name: Commit Linter
80+
uses: ./.github/workflows/step-node-commitlint.yml
81+
secrets: inherit
82+
83+
version:
84+
name: Version Management
85+
uses: ./.github/workflows/step-dotnet-version.yml
86+
with:
87+
dotnet-version: ${{ inputs.dotnetVersion || '8.x' }}
88+
dotnet-quality: ${{ inputs.dotnetQuality || 'ga' }}
89+
secrets: inherit
90+
91+
format:
92+
name: Code Formatting
93+
if: ${{ !inputs.disableCodeFormat }}
94+
uses: ./.github/workflows/step-dotnet-format.yml
95+
needs:
96+
- commitlinter
97+
with:
98+
dotnet-logging: ${{ inputs.dotnetLogging || 'minimal' }}
99+
dotnet-version: ${{ inputs.dotnetVersion || '8.x' }}
100+
dotnet-quality: ${{ inputs.dotnetQuality || 'ga' }}
101+
runs-on: ${{ inputs.runsOnBuild || 'ubuntu-latest' }}
102+
secrets: inherit
103+
104+
codeql:
105+
name: CodeQL Analysis
106+
if: ${{ !inputs.disableCodeQL }}
107+
uses: ./.github/workflows/step-dotnet-codeql.yml
108+
needs:
109+
- commitlinter
110+
with:
111+
dotnet-logging: ${{ inputs.dotnetLogging || 'minimal' }}
112+
dotnet-version: ${{ inputs.dotnetVersion || '8.x' }}
113+
dotnet-quality: ${{ inputs.dotnetQuality || 'ga' }}
114+
runs-on: ${{ inputs.runsOnBuild || 'ubuntu-latest' }}
115+
solution: ${{ inputs.solution }}
116+
secrets: inherit
117+
118+
tests:
119+
name: Run Tests
120+
uses: ./.github/workflows/step-dotnet-tests.yml
121+
needs:
122+
- commitlinter
123+
- version
124+
strategy:
125+
fail-fast: ${{ inputs.failFast || true }}
126+
matrix:
127+
os:
128+
- windows-latest
129+
- ubuntu-latest
130+
- macos-latest
131+
exclude:
132+
- os: ${{ inputs.disableTestsOnMacOs && 'macos-latest' }}
133+
- os: ${{ inputs.disableTestsOnLinux && 'ubuntu-latest' }}
134+
- os: ${{ inputs.disableTestsOnWindows && 'windows-latest' }}
135+
with:
136+
disableCoverageUpload: ${{ inputs.disableCoverageUpload || false }}
137+
dotnet-logging: ${{ inputs.dotnetLogging || 'minimal' }}
138+
dotnet-version: ${{ inputs.dotnetVersion || '8.x' }}
139+
dotnet-quality: ${{ inputs.dotnetQuality || 'ga' }}
140+
enableCleanUpDockerDocker: ${{ inputs.enableCleanUpDockerDocker || false }}
141+
runs-on: ${{ matrix.os }}
142+
solution: ${{ inputs.solution }}
143+
solution-version: ${{ needs.version.outputs.solution-version }}
144+
secrets: inherit
145+
146+
build:
147+
name: Build Solution
148+
if: ${{ !cancelled() && !failure() }}
149+
uses: ./.github/workflows/step-dotnet-build.yml
150+
needs:
151+
- tests
152+
- format
153+
- codeql
154+
with:
155+
dotnet-logging: ${{ inputs.dotnetLogging || 'minimal' }}
156+
dotnet-version: ${{ inputs.dotnetVersion || '8.x' }}
157+
dotnet-quality: ${{ inputs.dotnetQuality || 'ga' }}
158+
runs-on: ${{ inputs.runsOnBuild || 'ubuntu-latest' }}
159+
solution: ${{ inputs.solution }}
160+
secrets: inherit
161+
162+
dependabot:
163+
name: Dependabot Merge
164+
if: ${{ !cancelled() && !failure() && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
165+
uses: ./.github/workflows/step-dependabot-merge.yml
166+
needs:
167+
- build
168+
secrets: inherit

0 commit comments

Comments
 (0)