Skip to content

Commit

Permalink
Use a matrix to configure CI for C#
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Sep 3, 2023
1 parent 30d5cef commit cb949bf
Showing 1 changed file with 17 additions and 74 deletions.
91 changes: 17 additions & 74 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,26 @@ on:
- pull_request

jobs:
test-dotnet21:
test:
strategy:
fail-fast: false
matrix:
include:
- { dotnet: 2.1.x, framework: netcoreapp2.1 }
- { dotnet: 2.2.x, framework: netcoreapp2.2 }
- { dotnet: 3.0.x, framework: netcoreapp3.0 }
- { dotnet: 3.1.x, framework: netcoreapp3.1 }
- { dotnet: 5.0.x, framework: net5.0 }
- { dotnet: 6.0.x, framework: net6.0 }
- { dotnet: 7.0.x, framework: net7.0 }
name: ${{ matrix.dotnet }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup .NET Core SDK 2.1.x
uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '2.1.x'
- name: Run test 2.1.x
run: make test-cs
dotnet-version: ${{ matrix.dotnet }}
- run: make test-cs
env:
DOTNET_SDK: netcoreapp2.1
test-dotnet22:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup .NET Core SDK 2.2.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '2.2.x'
- name: Run test 2.2.x
run: make test-cs
env:
DOTNET_SDK: netcoreapp2.2
test-dotnet30:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup .NET Core SDK 3.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.0.x'
- name: Run test 3.0.x
run: make test-cs
env:
DOTNET_SDK: netcoreapp3.0
test-dotnet31:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup .NET Core SDK 3.1.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
- name: Run test 3.1.x
run: make test-cs
env:
DOTNET_SDK: netcoreapp3.1
test-dotnet50:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup .NET Core SDK 5.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'
- name: Run test 5.0.x
run: make test-cs
env:
DOTNET_SDK: net5.0
test-dotnet60:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup .NET Core SDK 6.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Run test 6.0.x
run: make test-cs
env:
DOTNET_SDK: net6.0


DOTNET_SDK: ${{ matrix.framework }}

0 comments on commit cb949bf

Please sign in to comment.