-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.51 KB
/
ci.yml
File metadata and controls
49 lines (40 loc) · 1.51 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
# CI: build + test on every push to master and every PR targeting master.
#
# This workflow enables the `required_status_checks` rule on the master branch
# ruleset (rule references the `build-and-test` job context). Without this
# workflow existing and running, the rule would block ALL pushes to master
# because the required check would never report.
#
# All actions are pinned to commit SHAs per the repo-level
# `sha_pinning_required` enforcement. Trailing `# v4` comments preserve
# human-readable version context. Dependabot (`.github/dependabot.yml`,
# `package-ecosystem: github-actions`) PRs SHA bumps as upstream actions tag
# new versions.
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
build-and-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: 10.x
- name: Restore
run: dotnet restore ControlMenu.sln
- name: Build
run: dotnet build ControlMenu.sln -c Release --no-restore
- name: Test
run: dotnet test ControlMenu.sln -c Release --no-build --logger "trx;LogFileName=test-results.trx"
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results
path: '**/test-results.trx'