Skip to content

Commit

Permalink
testing caching
Browse files Browse the repository at this point in the history
  • Loading branch information
lipkau committed Dec 21, 2023
1 parent cc09a14 commit ca217bc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,26 @@ 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:
name: Release
path: ./Release/

test:
needs: build
needs: [build]

strategy:
matrix:
Expand All @@ -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"
Expand All @@ -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:
Expand Down

0 comments on commit ca217bc

Please sign in to comment.