From 71228fdbf62d38d127c9dd875e30226d79188848 Mon Sep 17 00:00:00 2001 From: Nogic <24802730+nogic1008@users.noreply.github.com> Date: Thu, 27 Apr 2023 08:13:09 +0900 Subject: [PATCH] ci: add e2e test for cache --- .github/workflows/e2e-tests.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 9963bbc..f670939 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -205,6 +205,34 @@ jobs: shell: pwsh run: __tests__/verify-dotnet.ps1 -Patterns "^7\.0\.\d+-" + test-setup-with-cache: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest, windows-latest, macos-latest] + env: + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Clear toolcache + shell: pwsh + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} + - name: Setup .NET Core 3.1 + id: setup-dotnet + uses: ./ + with: + dotnet-version: 3.1 + cache: true + - name: Verify Cache + if: steps.setup-dotnet.outputs.cache-hit == 'true' + shell: bash + run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi + - name: Verify dotnet + shell: pwsh + run: __tests__/verify-dotnet.ps1 -Patterns "^3.1" + test-dotnet-version-output-during-single-version-installation: runs-on: ${{ matrix.operating-system }} strategy: