-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (36 loc) · 1.83 KB
/
build-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
name: .NET Build and Test
on: [push, pull_request]
defaults:
run:
working-directory: src
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
spectre_version: ['0.46.1-preview.0.19', '0.47.0', '0.48.0', '0.48.1-preview.0.35'] # Add more versions as needed
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetches all history for all tags and branches
- name: Set up .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'
- name: Clean
run: dotnet clean CiFilter.slnf
- name: Install Spectre dependency
run: |
dotnet remove ./JKToolKit.Spectre.AutoCompletion.Tests/JKToolKit.Spectre.AutoCompletion.Tests.csproj package Spectre.Console
dotnet remove ./JKToolKit.Spectre.AutoCompletion.Tests/JKToolKit.Spectre.AutoCompletion.Tests.csproj package Spectre.Console.Cli
dotnet remove ./JKToolKit.Spectre.AutoCompletion.Tests/JKToolKit.Spectre.AutoCompletion.Tests.csproj package Spectre.Console.Testing
dotnet add ./JKToolKit.Spectre.AutoCompletion.Tests/JKToolKit.Spectre.AutoCompletion.Tests.csproj package Spectre.Console --version ${{ matrix.spectre_version }}
dotnet add ./JKToolKit.Spectre.AutoCompletion.Tests/JKToolKit.Spectre.AutoCompletion.Tests.csproj package Spectre.Console.Cli --version ${{ matrix.spectre_version }}
dotnet add ./JKToolKit.Spectre.AutoCompletion.Tests/JKToolKit.Spectre.AutoCompletion.Tests.csproj package Spectre.Console.Testing --version ${{ matrix.spectre_version }}
- name: Restore
run: dotnet restore CiFilter.slnf
- name: Build
run: dotnet build CiFilter.slnf --no-restore
# Optionally, you can add a test step if you have tests in your solution
- name: Test
run: dotnet test CiFilter.slnf --no-build --verbosity normal