Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: run samples on both .NET 6 and 8 #415

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,26 @@ on:
jobs:
run-samples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dotnet: [ "6.0", "8.0" ]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Run samples
working-directory: ./Google.Cloud.EntityFrameworkCore.Spanner.Samples
run: dotnet run All
- uses: actions/checkout@v4
- name: Setup .NET
id: setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{matrix.dotnet}}.x
- name: Create global.json file
run: "echo '{\"sdk\":{\"version\": \"${{ steps.setup.outputs.dotnet-version }}\"}}' > ./global.json"
- run: dotnet --version
- name: Restore dependencies
working-directory: ./Google.Cloud.EntityFrameworkCore.Spanner.Samples
run: dotnet restore -p:TargetFramework=net${{ matrix.dotnet }}
- name: Build
run: dotnet build --no-restore --framework net${{ matrix.dotnet }}
working-directory: ./Google.Cloud.EntityFrameworkCore.Spanner.Samples
- name: Run samples
working-directory: ./Google.Cloud.EntityFrameworkCore.Spanner.Samples
run: dotnet run --no-build --framework net${{ matrix.dotnet }} All
Loading