Repository navigation
54 lines (45 loc) · 1.49 KB
/
Copy pathci.yml
File metadata and controls
54 lines (45 loc) · 1.49 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
name: CI
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
# Builds and tests untrusted pull request code; the token only needs to read the repository.
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
name: build-test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
# macOS runners bill at 10x in a private repository, so pull requests build on Linux and
# Windows only. macOS is built when a release is tagged (release.yml), and the code it
# alone runs (MacTelHandlerRegistration) is thin interop no test here could exercise.
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore Freizeichen.slnx --locked-mode
- name: Build
run: dotnet build Freizeichen.slnx -c Release --no-restore
- name: Test
run: dotnet test Freizeichen.slnx -c Release --no-build
- name: Format check
if: matrix.os == 'ubuntu-latest'
run: dotnet format Freizeichen.slnx --verify-no-changes --no-restore