|
4 | 4 | pull_request: |
5 | 5 |
|
6 | 6 | jobs: |
7 | | - build-linux: |
8 | | - name: Build (Linux) |
9 | | - runs-on: ubuntu-latest |
10 | | - |
11 | | - steps: |
12 | | - - name: Check out repository |
13 | | - uses: actions/checkout@v4 |
14 | | - with: |
15 | | - fetch-depth: 0 |
16 | | - |
17 | | - - name: Set up .NET SDK |
18 | | - uses: actions/setup-dotnet@v4 |
19 | | - with: |
20 | | - dotnet-version: 8.0.x |
21 | | - |
22 | | - - name: Restore |
23 | | - run: dotnet restore LiteDB.sln |
24 | | - |
25 | | - - name: Build |
26 | | - run: dotnet build LiteDB.sln --configuration Release --no-restore /p:DefineConstants=TESTING |
27 | | - |
28 | | - - name: Package build outputs |
29 | | - run: tar -czf tests-build-linux.tar.gz LiteDB/bin/Release LiteDB/obj/Release LiteDB.Tests/bin/Release LiteDB.Tests/obj/Release |
30 | | - |
31 | | - - name: Upload linux test build |
32 | | - uses: actions/upload-artifact@v4 |
33 | | - with: |
34 | | - name: tests-build-linux |
35 | | - path: tests-build-linux.tar.gz |
36 | | - |
37 | | - # build-windows: |
38 | | - # name: Build (Windows) |
39 | | - # runs-on: windows-latest |
40 | | - |
41 | | - # steps: |
42 | | - # - name: Check out repository |
43 | | - # uses: actions/checkout@v4 |
44 | | - # with: |
45 | | - # fetch-depth: 0 |
46 | | - |
47 | | - # - name: Set up .NET SDK |
48 | | - # uses: actions/setup-dotnet@v4 |
49 | | - # with: |
50 | | - # dotnet-version: 8.0.x |
51 | | - |
52 | | - # - name: Restore |
53 | | - # run: dotnet restore LiteDB.sln |
54 | | - |
55 | | - # - name: Build |
56 | | - # run: dotnet build LiteDB.sln --configuration Release --no-restore /p:DefineConstants=TESTING |
57 | | - |
58 | | - # - name: Package build outputs |
59 | | - # shell: pwsh |
60 | | - # run: Compress-Archive -Path "LiteDB\bin\Release","LiteDB\obj\Release","LiteDB.Tests\bin\Release","LiteDB.Tests\obj\Release" -DestinationPath tests-build-windows.zip |
61 | | - |
62 | | - # - name: Upload windows test build |
63 | | - # uses: actions/upload-artifact@v4 |
64 | | - # with: |
65 | | - # name: tests-build-windows |
66 | | - # path: tests-build-windows.zip |
67 | | - |
68 | | - test-linux: |
69 | | - name: Test (Linux ${{ matrix.display }}) |
70 | | - runs-on: ubuntu-latest |
71 | | - needs: build-linux |
72 | | - strategy: |
73 | | - fail-fast: false |
74 | | - matrix: |
75 | | - include: |
76 | | - - display: .NET 8 |
77 | | - sdk: | |
78 | | - 8.0.x |
79 | | - framework: net8.0 |
80 | | - include-prerelease: false |
81 | | - - display: .NET 9 |
82 | | - sdk: | |
83 | | - 9.0.x |
84 | | - 8.0.x |
85 | | - framework: net8.0 |
86 | | - include-prerelease: true |
87 | | - - display: .NET 10 |
88 | | - sdk: | |
89 | | - 10.0.x |
90 | | - 8.0.x |
91 | | - framework: net8.0 |
92 | | - include-prerelease: true |
93 | | - |
94 | | - steps: |
95 | | - - name: Check out repository |
96 | | - uses: actions/checkout@v4 |
97 | | - with: |
98 | | - fetch-depth: 0 |
99 | | - |
100 | | - - name: Set up .NET SDK ${{ matrix.display }} |
101 | | - uses: actions/setup-dotnet@v4 |
102 | | - with: |
103 | | - dotnet-version: ${{ matrix.sdk }} |
104 | | - include-prerelease: ${{ matrix.include-prerelease }} |
105 | | - |
106 | | - - name: Download build artifacts |
107 | | - uses: actions/download-artifact@v4 |
108 | | - with: |
109 | | - name: tests-build-linux |
110 | | - |
111 | | - - name: Extract build artifacts |
112 | | - run: tar -xzf tests-build-linux.tar.gz |
113 | | - |
114 | | - - name: Build test project for target framework |
115 | | - run: >- |
116 | | - dotnet build LiteDB.Tests/LiteDB.Tests.csproj |
117 | | - --configuration Release |
118 | | - --framework ${{ matrix.framework }} |
119 | | - --no-dependencies |
120 | | -
|
121 | | - - name: Run tests |
122 | | - timeout-minutes: 5 |
123 | | - run: >- |
124 | | - dotnet test LiteDB.Tests/LiteDB.Tests.csproj |
125 | | - --configuration Release |
126 | | - --no-build |
127 | | - --framework ${{ matrix.framework }} |
128 | | - --verbosity normal |
129 | | - --settings tests.runsettings |
130 | | - --logger "trx;LogFileName=TestResults.trx" |
131 | | - --logger "console;verbosity=detailed" |
132 | | -
|
133 | | - # test-windows: |
134 | | - # name: Test (Windows ${{ matrix.display }}) |
135 | | - # runs-on: windows-latest |
136 | | - # needs: build-windows |
137 | | - # strategy: |
138 | | - # fail-fast: false |
139 | | - # matrix: |
140 | | - # include: |
141 | | - # - display: .NET Framework 4.6.1 |
142 | | - # sdk: | |
143 | | - # 8.0.x |
144 | | - # framework: net461 |
145 | | - # include-prerelease: false |
146 | | - # - display: .NET Framework 4.8.1 |
147 | | - # sdk: | |
148 | | - # 8.0.x |
149 | | - # framework: net481 |
150 | | - # include-prerelease: false |
151 | | - # - display: .NET 8 |
152 | | - # sdk: | |
153 | | - # 8.0.x |
154 | | - # framework: net8.0 |
155 | | - # include-prerelease: false |
156 | | - # - display: .NET 9 |
157 | | - # sdk: | |
158 | | - # 9.0.x |
159 | | - # 8.0.x |
160 | | - # framework: net8.0 |
161 | | - # include-prerelease: true |
162 | | - # - display: .NET 10 |
163 | | - # sdk: | |
164 | | - # 10.0.x |
165 | | - # 8.0.x |
166 | | - # framework: net8.0 |
167 | | - # include-prerelease: true |
168 | | - |
169 | | - # steps: |
170 | | - # - name: Check out repository |
171 | | - # uses: actions/checkout@v4 |
172 | | - # with: |
173 | | - # fetch-depth: 0 |
174 | | - |
175 | | - # - name: Set up .NET SDK ${{ matrix.display }} |
176 | | - # uses: actions/setup-dotnet@v4 |
177 | | - # with: |
178 | | - # dotnet-version: ${{ matrix.sdk }} |
179 | | - # include-prerelease: ${{ matrix.include-prerelease }} |
180 | | - |
181 | | - # - name: Download build artifacts |
182 | | - # uses: actions/download-artifact@v4 |
183 | | - # with: |
184 | | - # name: tests-build-windows |
185 | | - |
186 | | - # - name: Extract build artifacts |
187 | | - # shell: pwsh |
188 | | - # run: Expand-Archive -Path tests-build-windows.zip -DestinationPath . -Force |
189 | | - |
190 | | - # - name: Build test project for target framework |
191 | | - # run: >- |
192 | | - # dotnet build LiteDB.Tests/LiteDB.Tests.csproj |
193 | | - # --configuration Release |
194 | | - # --framework ${{ matrix.framework }} |
195 | | - # --no-dependencies |
196 | | - |
197 | | - # - name: Run tests |
198 | | - # timeout-minutes: 10 |
199 | | - # run: >- |
200 | | - # dotnet test LiteDB.Tests/LiteDB.Tests.csproj |
201 | | - # --configuration Release |
202 | | - # --no-build |
203 | | - # --framework ${{ matrix.framework }} |
204 | | - # --verbosity normal |
205 | | - # --settings tests.runsettings |
206 | | - # --logger "trx;LogFileName=TestResults.trx" |
207 | | - # --logger "console;verbosity=detailed" |
208 | | - |
209 | | - repro-runner: |
210 | | - runs-on: ubuntu-latest |
211 | | - needs: build-linux |
212 | | - |
213 | | - steps: |
214 | | - - name: Check out repository |
215 | | - uses: actions/checkout@v4 |
216 | | - with: |
217 | | - fetch-depth: 0 |
218 | | - |
219 | | - - name: Set up .NET SDK |
220 | | - uses: actions/setup-dotnet@v4 |
221 | | - with: |
222 | | - dotnet-version: 8.0.x |
223 | | - |
224 | | - - name: Restore |
225 | | - run: dotnet restore LiteDB.sln |
226 | | - |
227 | | - - name: Build |
228 | | - run: dotnet build LiteDB.sln --configuration Release --no-restore |
229 | | - |
230 | | - - name: List repros |
231 | | - run: dotnet run --project LiteDB.ReproRunner/LiteDB.ReproRunner.Cli -- list --strict |
232 | | - |
233 | | - - name: Validate manifests |
234 | | - run: dotnet run --project LiteDB.ReproRunner/LiteDB.ReproRunner.Cli -- validate |
235 | | - |
236 | | - - name: Run repro suite |
237 | | - run: dotnet run --project LiteDB.ReproRunner/LiteDB.ReproRunner.Cli -- run --all --report repro-summary.json |
238 | | - |
239 | | - - name: Upload repro summary |
240 | | - uses: actions/upload-artifact@v4 |
241 | | - with: |
242 | | - name: repro-summary |
243 | | - path: repro-summary.json |
| 7 | + build-and-test: |
| 8 | + uses: ./.github/workflows/_reusable-ci.yml |
0 commit comments