Skip to content

Fix .NET version for Cake.Issues.MsBuild integration test #685

Fix .NET version for Cake.Issues.MsBuild integration test

Fix .NET version for Cake.Issues.MsBuild integration test #685

name: Integration tests
# Workflow Trigger
on:
# Trigger the workflow on a pull request to any branch
pull_request:
# Triggers the workflow in the event there is a push to master
push:
branches:
- master
jobs:
# Build
Build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Get the sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Install .NET
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
with:
# .NET 5 required for GitVersion
dotnet-version: |
5.x
6.x
7.x
8.x
- name: Build
run: ./build.sh --target=Create-NuGet-Packages
shell: bash
- name: Publish NuGet package as build artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: NuGet Package
path: ./BuildArtifacts/Packages/NuGet/
# Integration Tests Cake.Issues.MsBuild Cake Scripting
IntegrationTestsMsBuildCakeScripting:
name: Integration Tests Cake.Issues.MsBuild Cake Scripting
needs: Build
strategy:
fail-fast: false
matrix:
os: [
windows-2019, windows-2022,
ubuntu-20.04, ubuntu-22.04, ubuntu-24.04,
macos-13, macos-14]
dotnet: [6.x, 7.x, 8.x]
runs-on: ${{ matrix.os }}
steps:
- name: Get the sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Prepare integration tests
uses: ./.github/actions/prepare-integration-test
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Determine TFM
run: echo "TFM=net${{ matrix.dotnet:0:1 }}.0" >> $GITHUB_ENV

Check failure on line 60 in .github/workflows/integrationtests.yml

View workflow run for this annotation

GitHub Actions / Integration tests

Invalid workflow file

The workflow is not valid. .github/workflows/integrationtests.yml (Line: 60, Col: 14): Unexpected symbol: 'dotnet:0:1'. Located at position 8 within expression: matrix.dotnet:0:1
- name: Run integration tests
run: ./build.sh --verbosity=diagnostic
working-directory: ./tests/Cake.Issues.MsBuild/script-runner/${{ env.TFM }}
shell: bash
# Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting
IntegrationTestsPullRequestsGitHubActionsCakeScripting:
name: Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting
needs: Build
strategy:
fail-fast: false
matrix:
os: [
windows-2019, windows-2022,
ubuntu-20.04, ubuntu-22.04, ubuntu-24.04,
macos-13, macos-14]
dotnet: [6.x, 7.x, 8.x]
runs-on: ${{ matrix.os }}
steps:
- name: Get the sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Prepare integration tests
uses: ./.github/actions/prepare-integration-test
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Run integration tests
run: ./build.sh --verbosity=diagnostic
working-directory: ./tests/Cake.Issues.PullRequests.GitHubActions/script-runner/
shell: bash