mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-22 10:31:17 +01:00
Add test for relative paths
This commit is contained in:
parent
f60097cd16
commit
4a724707e9
1 changed files with 39 additions and 4 deletions
43
.github/workflows/workflow.yml
vendored
43
.github/workflows/workflow.yml
vendored
|
@ -57,7 +57,7 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- name: Generate files
|
||||
shell: bash
|
||||
run: __tests__/create-cache-files.sh ${{ runner.os }}
|
||||
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
||||
- name: Save cache
|
||||
uses: ./
|
||||
with:
|
||||
|
@ -79,7 +79,42 @@ jobs:
|
|||
path: test-cache
|
||||
- name: Verify cache
|
||||
shell: bash
|
||||
run: __tests__/verify-cache-files.sh ${{ runner.os }}
|
||||
run: __tests__/verify-cache-files.sh ${{ runner.os }} test-cache
|
||||
|
||||
# End to end save and restore with relative paths
|
||||
test-save:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Generate files
|
||||
shell: bash
|
||||
run: __tests__/create-cache-files.sh ${{ runner.os }} ~/test-cache
|
||||
- name: Save cache
|
||||
uses: ./
|
||||
with:
|
||||
key: test-relative-${{ runner.os }}-${{ github.run_id }}
|
||||
path: ~test-cache
|
||||
test-restore:
|
||||
needs: test-save
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Restore cache
|
||||
uses: ./
|
||||
with:
|
||||
key: test-relative-${{ runner.os }}-${{ github.run_id }}
|
||||
path: test-cache
|
||||
- name: Verify cache
|
||||
shell: bash
|
||||
run: __tests__/verify-cache-files.sh ${{ runner.os }} ~/test-cache
|
||||
|
||||
# End to end with proxy
|
||||
test-proxy-save:
|
||||
|
@ -98,7 +133,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Generate files
|
||||
run: __tests__/create-cache-files.sh proxy
|
||||
run: __tests__/create-cache-files.sh proxy test-cache
|
||||
- name: Save cache
|
||||
uses: ./
|
||||
with:
|
||||
|
@ -126,4 +161,4 @@ jobs:
|
|||
key: test-proxy-${{ github.run_id }}
|
||||
path: test-cache
|
||||
- name: Verify cache
|
||||
run: __tests__/verify-cache-files.sh proxy
|
||||
run: __tests__/verify-cache-files.sh proxy test-cache
|
||||
|
|
Loading…
Reference in a new issue