-
Notifications
You must be signed in to change notification settings - Fork 55
137 lines (131 loc) · 3.93 KB
/
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Build and Test
on: [push, pull_request]
jobs:
test-win:
runs-on: windows-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
steps:
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- run: dotnet --info
- uses: actions/checkout@v4
- name: Test (.NET 8.0/Debug)
run: dotnet test tests -f net8.0 -c Debug
- name: Test (.NET 8.0/Release)
run: dotnet test tests -f net8.0 -c Release
- name: Test (.NET 6.0/Debug)
run: dotnet test tests -f net6.0 -c Debug
- name: Test (.NET 6.0/Release)
run: dotnet test tests -f net6.0 -c Release
- name: Pack
run: dotnet pack -c Release
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: '**/*.nupkg'
test-macos:
needs: [test-win, test-linux-musl]
strategy:
fail-fast: false
matrix:
include:
- os: macos-12
- os: macos-13
- os: macos-14
runs-on: ${{ matrix.os }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
steps:
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- run: dotnet --info
- uses: actions/checkout@v4
- name: Test (.NET 8.0/Debug)
run: dotnet test tests -f net8.0 -c Debug
- name: Test (.NET 8.0/Release)
run: dotnet test tests -f net8.0 -c Release
- name: Test (.NET 6.0/Debug)
run: dotnet test tests -f net6.0 -c Debug
- name: Test (.NET 6.0/Release)
run: dotnet test tests -f net6.0 -c Release
test-linux:
needs: [test-win, test-linux-musl]
strategy:
fail-fast: false
matrix:
include:
- os: debian:10
- os: debian:11
- os: debian:12
- os: fedora:38
- os: fedora:39
- os: fedora:40
- os: ubuntu:20.04
- os: ubuntu:22.04
- os: ubuntu:24.04
runs-on: ubuntu-latest
container:
image: ${{ matrix.os }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
steps:
- name: Install prerequisites
run: yum install -q -y curl ca-certificates libicu
if: ${{ startsWith(matrix.os, 'centos') }}
- name: Install prerequisites
run: apt-get -qq update && apt-get -qq install --yes --no-install-recommends curl ca-certificates gettext
if: ${{ startsWith(matrix.os, 'debian') }}
- name: Install prerequisites
run: dnf install -q -y curl ca-certificates libicu findutils
if: ${{ startsWith(matrix.os, 'fedora') }}
- name: Install prerequisites
run: apt-get -qq update && apt-get -qq install --yes --no-install-recommends curl ca-certificates gettext
if: ${{ startsWith(matrix.os, 'ubuntu') }}
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- run: dotnet --info
- uses: actions/checkout@v4
- name: Test (.NET 8.0/Debug)
run: dotnet test tests -f net8.0 -c Debug
- name: Test (.NET 8.0/Release)
run: dotnet test tests -f net8.0 -c Release
- name: Test (.NET 6.0/Debug)
run: dotnet test tests -f net6.0 -c Debug
- name: Test (.NET 6.0/Release)
run: dotnet test tests -f net6.0 -c Release
test-linux-musl:
strategy:
fail-fast: false
matrix:
include:
- os: alpine3.18
- os: alpine3.19
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:8.0-${{ matrix.os }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
steps:
- run: dotnet --info
- uses: actions/checkout@v4
- name: Test (.NET 8.0/Debug)
run: dotnet test tests -f net8.0 -c Debug
- name: Test (.NET 8.0/Release)
run: dotnet test tests -f net8.0 -c Release