Skip to content

Commit

Permalink
Add a cache-version parameter
Browse files Browse the repository at this point in the history
This allows dealing with a corrupted cache.
https://github.com/ruby/setup-ruby#dealing-with-a-corrupted-cache
  • Loading branch information
ekohl committed Mar 8, 2022
1 parent 8799fe0 commit 1da427c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
default: '.'
required: false
type: string
cache-version:
description: The cache version to pass to setup-ruby
default: '0'
required: false
type: string

jobs:
setup_matrix:
Expand All @@ -40,6 +45,7 @@ jobs:
with:
ruby-version: '3.0'
bundler-cache: true
cache-version: ${{ inputs.cache-version }}
working-directory: ${{ inputs.working-directory }}
- name: Run static validations
run: bundle exec rake validate lint check
Expand Down Expand Up @@ -72,6 +78,7 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: ${{ inputs.cache-version }}
working-directory: ${{ inputs.working-directory }}
- name: Run tests
run: bundle exec rake parallel_spec
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/beaker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
default: '.'
required: false
type: string
cache-version:
description: The cache version to pass to setup-ruby
default: '0'
required: false
type: string

jobs:
setup_matrix:
Expand All @@ -45,6 +50,7 @@ jobs:
with:
ruby-version: '3.0'
bundler-cache: true
cache-version: ${{ inputs.cache-version }}
working-directory: ${{ inputs.working-directory }}
- name: Run static validations
run: bundle exec rake validate lint check
Expand Down Expand Up @@ -77,6 +83,7 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: ${{ inputs.cache-version }}
working-directory: ${{ inputs.working-directory }}
- name: Run tests
run: bundle exec rake parallel_spec
Expand All @@ -102,6 +109,7 @@ jobs:
with:
ruby-version: '3.0'
bundler-cache: true
cache-version: ${{ inputs.cache-version }}
working-directory: ${{ inputs.working-directory }}
- name: Run tests
run: bundle exec rake beaker
Expand Down

0 comments on commit 1da427c

Please sign in to comment.