From ca217bc07172dcd92bdd9b1d64ab5795fcb24311 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Thu, 21 Dec 2023 12:20:19 +0100 Subject: [PATCH] testing caching --- .github/workflows/cd.yml | 10 ++++++---- .github/workflows/ci.yml | 25 +++++++++++++++---------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 96bf10b9..e572b7b7 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -28,13 +28,15 @@ jobs: - uses: actions/cache@v3 id: cacher with: - path: "~/.local/share/powershell/Modules" key: ${{ runner.os }}-PSModules + path: "~/.local/share/powershell/Modules" - name: Setup - run: | - ./Tools/setup.ps1 - Invoke-Build -Task ShowInfo + if: ${{ steps.cacher.outputs.cache-hit != 'true' }} + run: ./Tools/setup.ps1 + + - name: CI Context Info + run: Invoke-Build -Task ShowInfo - name: Deploy env: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e3de958..2428748e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,17 +33,18 @@ jobs: - uses: actions/cache@v3 id: cacher with: - path: "~/.local/share/powershell/Modules" key: ${{ runner.os }}-PSModules + path: "~/.local/share/powershell/Modules" - name: Setup - run: | - ./Tools/setup.ps1 - Invoke-Build -Task ShowInfo + if: ${{ steps.cacher.outputs.cache-hit != 'true' }} + run: ./Tools/setup.ps1 + + - name: CI Context Info + run: Invoke-Build -Task ShowInfo - name: Build - run: | - Invoke-Build -Task Clean, Build + run: Invoke-Build -Task Clean, Build - uses: actions/upload-artifact@v4 with: @@ -51,7 +52,7 @@ jobs: path: ./Release/ test: - needs: build + needs: [build] strategy: matrix: @@ -74,11 +75,15 @@ jobs: - uses: actions/cache@v3 id: cacher with: - path: "~/.local/share/powershell/Modules" key: ${{ runner.os }}-PSModules + path: "~/.local/share/powershell/Modules" - name: Setup - run: ${{ matrix.shell }} -c ". ./Tools/setup.ps1; Invoke-Build -Task ShowInfo" + if: ${{ steps.cacher.outputs.cache-hit != 'true' }} + run: ${{ matrix.shell }} -c ". ./Tools/setup.ps1" + + - name: CI Context Info + run: ${{ matrix.shell }} -c "Invoke-Build -Task ShowInfo" - name: Test run: ${{ matrix.shell }} -c "Invoke-Build -Task Test" @@ -88,7 +93,7 @@ jobs: name: ${{ runner.os }}-${{ matrix.shell }}-Unit-Tests path: Test*.xml if-no-files-found: error - if: ${{ always() }} + if: ${{ always() }} # test_against_cloud: # env: