mirror of
https://github.com/actions/cache.git
synced 2024-12-20 02:39:06 +00:00
Combine relative jobs into main test jobs
This commit is contained in:
parent
0e86d5c038
commit
e5370355e6
51
.github/workflows/workflow.yml
vendored
51
.github/workflows/workflow.yml
vendored
@ -56,14 +56,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Generate files
|
- name: Generate files in working directory
|
||||||
shell: bash
|
shell: bash
|
||||||
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
||||||
|
- name: Generate files outside working directory
|
||||||
|
shell: bash
|
||||||
|
run: __tests__/create-cache-files.sh ${{ runner.os }} ~/test-cache
|
||||||
- name: Save cache
|
- name: Save cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
key: test-${{ runner.os }}-${{ github.run_id }}
|
key: test-${{ runner.os }}-${{ github.run_id }}
|
||||||
path: test-cache
|
path: |
|
||||||
|
test-cache
|
||||||
|
~/test-cache
|
||||||
test-restore:
|
test-restore:
|
||||||
needs: test-save
|
needs: test-save
|
||||||
strategy:
|
strategy:
|
||||||
@ -78,45 +83,13 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
key: test-${{ runner.os }}-${{ github.run_id }}
|
key: test-${{ runner.os }}-${{ github.run_id }}
|
||||||
path: test-cache
|
path: |
|
||||||
- name: Verify cache
|
test-cache
|
||||||
|
~/test-cache
|
||||||
|
- name: Verify cache files in working directory
|
||||||
shell: bash
|
shell: bash
|
||||||
run: __tests__/verify-cache-files.sh ${{ runner.os }} test-cache
|
run: __tests__/verify-cache-files.sh ${{ runner.os }} test-cache
|
||||||
|
- name: Verify cache files outside working directory
|
||||||
# End to end save and restore with relative paths
|
|
||||||
test-save-relative:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
||||||
fail-fast: false
|
|
||||||
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-relative:
|
|
||||||
needs: test-save-relative
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
||||||
fail-fast: false
|
|
||||||
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
|
shell: bash
|
||||||
run: __tests__/verify-cache-files.sh ${{ runner.os }} ~/test-cache
|
run: __tests__/verify-cache-files.sh ${{ runner.os }} ~/test-cache
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user