-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (36 loc) · 1.52 KB
/
Copy pathtest.yml
File metadata and controls
47 lines (36 loc) · 1.52 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
name: Build & Test
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Install .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.x
10.x
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Build (Debug)
run: dotnet build -c Debug
- name: Build (Release)
run: dotnet build -c Release
- name: Pack (AOT validation)
run: dotnet pack src/Ramstack.HtmxToolkit/Ramstack.HtmxToolkit.csproj -c Release -o "${RUNNER_TEMP}/aot-packages" --no-build --no-restore -p:MinVerVersionOverride=0.0.0-aot
- name: Restore (AOT validation)
run: dotnet restore tests/Ramstack.HtmxToolkit.AotValidation/Ramstack.HtmxToolkit.AotValidation.csproj -r linux-x64 --source "${RUNNER_TEMP}/aot-packages" --source https://api.nuget.org/v3/index.json
- name: Publish (AOT validation)
run: dotnet publish tests/Ramstack.HtmxToolkit.AotValidation/Ramstack.HtmxToolkit.AotValidation.csproj -c Release -r linux-x64 --no-restore --warnaserror
- name: Run (AOT validation)
run: tests/Ramstack.HtmxToolkit.AotValidation/bin/Release/net8.0/linux-x64/publish/Ramstack.HtmxToolkit.AotValidation
- name: Test (Debug)
run: dotnet test -c Debug --no-build
- name: Test (Release)
run: dotnet test -c Release --no-build