Do not copy around RYE_HOME #354
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'test-cache' | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-setup-cache: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup with cache | |
uses: ./ | |
with: | |
version: '0.11.0' | |
enable-cache: true | |
working-directory: __tests__/fixtures/rye-project | |
cache-prefix: ${{ github.run_id }}-${{ github.run_attempt }} | |
- run: rye sync | |
working-directory: __tests__/fixtures/rye-project | |
test-restore-cache: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, macos-14] | |
needs: test-setup-cache | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Restore with cache | |
id: restore | |
uses: ./ | |
with: | |
version: '0.11.0' | |
enable-cache: true | |
working-directory: __tests__/fixtures/rye-project | |
cache-prefix: ${{ github.run_id }}-${{ github.run_attempt }} | |
- name: Cache was hit | |
run: | | |
if [ "$CACHE_HIT" != "true" ]; then | |
exit 1 | |
fi | |
env: | |
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }} | |
- run: rye sync | |
working-directory: __tests__/fixtures/rye-project | |
test-setup-cache-local: | |
runs-on: oracle-aarch64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup with cache | |
uses: ./ | |
with: | |
version: '0.11.0' | |
enable-cache: true | |
working-directory: __tests__/fixtures/rye-project | |
cache-prefix: ${{ github.run_id }}-${{ github.run_attempt }} | |
cache-local-storage-path: /tmp/rye-cache | |
- run: rye sync | |
working-directory: __tests__/fixtures/rye-project | |
test-restore-cache-local: | |
runs-on: oracle-aarch64 | |
needs: test-setup-cache-local | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Restore with cache | |
id: restore | |
uses: ./ | |
with: | |
version: '0.11.0' | |
enable-cache: true | |
working-directory: __tests__/fixtures/rye-project | |
cache-prefix: ${{ github.run_id }}-${{ github.run_attempt }} | |
cache-local-storage-path: /tmp/rye-cache | |
- name: Cache was hit | |
run: | | |
if [ "$CACHE_HIT" != "true" ]; then | |
exit 1 | |
fi | |
env: | |
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }} | |
- run: rye sync | |
working-directory: __tests__/fixtures/rye-project |