From 038d7b9534faeb9510226e682e4ea9a57f3d790a Mon Sep 17 00:00:00 2001 From: Marcin Krystianc Date: Mon, 14 Oct 2024 10:53:39 +0200 Subject: [PATCH 1/5] fix the formatter's job --- .github/workflows/formatter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml index 2e3fbd496..91094f573 100644 --- a/.github/workflows/formatter.yml +++ b/.github/workflows/formatter.yml @@ -33,7 +33,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore tools run: dotnet tool restore From c2daa8451884bcf472f254d48ed1e91fc7a4d361 Mon Sep 17 00:00:00 2001 From: Marcin Krystianc Date: Mon, 14 Oct 2024 10:57:30 +0200 Subject: [PATCH 2/5] Do not cache --- .github/workflows/formatter.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml index 91094f573..3895d4e34 100644 --- a/.github/workflows/formatter.yml +++ b/.github/workflows/formatter.yml @@ -23,13 +23,6 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} - - name: Cache .NET tools - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: dotnet-tools-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }} - restore-keys: dotnet-tools-${{ runner.os }}- - - name: Setup .NET uses: actions/setup-dotnet@v4 with: From 1e135604b0e64d9b87d72c1fe55aacd1b7bd80bb Mon Sep 17 00:00:00 2001 From: Marcin Krystianc Date: Mon, 14 Oct 2024 11:02:22 +0200 Subject: [PATCH 3/5] Revert "Do not cache" This reverts commit c2daa8451884bcf472f254d48ed1e91fc7a4d361. --- .github/workflows/formatter.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml index 3895d4e34..91094f573 100644 --- a/.github/workflows/formatter.yml +++ b/.github/workflows/formatter.yml @@ -23,6 +23,13 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} + - name: Cache .NET tools + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: dotnet-tools-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }} + restore-keys: dotnet-tools-${{ runner.os }}- + - name: Setup .NET uses: actions/setup-dotnet@v4 with: From a4c6232325be351c894cf31643a4bccc5fcffd19 Mon Sep 17 00:00:00 2001 From: Marcin Krystianc Date: Mon, 14 Oct 2024 11:47:02 +0200 Subject: [PATCH 4/5] let's try using global.json's version --- .github/workflows/ci.yml | 8 +------- .github/workflows/formatter.yml | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbdbb5b3a..94ab6290d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup .NET SDK v8.0.x + - name: Setup .NET SDK uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x # For the time being (https://github.com/dotnet/format/issues/1500, https://github.com/dotnet/format/issues/1560) we need to use `dotnet-format` instead of `dotnet format` - name: Restore tool run: dotnet tool restore @@ -82,8 +80,6 @@ jobs: dotnet-version: 7.0.x - name: Setup .NET SDK v8.0.x uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - name: Setup Consul Enterprise URL # Consul enterprise until version 1.10.0 can be run even without a valid license, # so we take advantage of that and run enterprise tests for versions lower than 1.10.0. @@ -145,8 +141,6 @@ jobs: uses: actions/checkout@v4 - name: Setup .NET SDK v8.0.x uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - name: Create NuGet packages run: | if (-not ("${{ github.ref }}" -like "refs/tags/v*")) { diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml index 91094f573..dd08aad56 100644 --- a/.github/workflows/formatter.yml +++ b/.github/workflows/formatter.yml @@ -32,8 +32,6 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - name: Restore tools run: dotnet tool restore From 442edbcfbbe756e251dc83862be4b10d4a2a95d4 Mon Sep 17 00:00:00 2001 From: Marcin Krystianc Date: Mon, 14 Oct 2024 12:19:54 +0200 Subject: [PATCH 5/5] clean it up --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94ab6290d..f64c51b2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,10 +47,8 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 7.0.x - - name: Setup .NET SDK v8.0.x + - name: Setup .NET SDK uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - name: Build run: dotnet build Consul.AspNetCore.Test --configuration=Release --framework=${{ matrix.framework }} - name: Run tests @@ -78,7 +76,7 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 7.0.x - - name: Setup .NET SDK v8.0.x + - name: Setup .NET SDK uses: actions/setup-dotnet@v4 - name: Setup Consul Enterprise URL # Consul enterprise until version 1.10.0 can be run even without a valid license, @@ -139,7 +137,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup .NET SDK v8.0.x + - name: Setup .NET SDK uses: actions/setup-dotnet@v4 - name: Create NuGet packages run: |