Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer to built-in action caching #1938

Merged
merged 7 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-build-rails-main-ruby-3.3-${{ hashFiles('**/Gemfile.lock') }}
bundler-cache: true
- name: Run benchmarks
run: |
bundle config path vendor/bundle
bundle update
bundle exec rake partial_benchmark
bundle exec rake translatable_benchmark
test:
Expand Down Expand Up @@ -103,24 +98,20 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
ruby-version: 3.3
bundler-cache: true
working-directory: 'view_component'
- uses: actions/setup-node@v4
with:
node-version: 16
- uses: actions/cache@v4
with:
path: |
node_modules
vendor/bundle
key: gems-build-pvc-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/package-json.lock') }}
cache: 'npm'
cache-dependency-path: 'primer_view_components/package-lock.json'
- name: Build and test with Rake
run: |
cd primer_view_components
npm ci
cd demo && npm ci && cd ..
bundle config path vendor/bundle
bundle install
bundle exec rake
bundle && bundle exec rake
env:
VIEW_COMPONENT_PATH: ../view_component
RAILS_VERSION: '7.1.1'
Expand All @@ -134,16 +125,9 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Download coverage results
uses: actions/download-artifact@v3
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-build-rails-main-ruby-3.3-${{ hashFiles('**/Gemfile.lock') }}
- name: Collate simplecov
run: |
bundle config path vendor/bundle
bundle update
bundle exec rake coverage:report
env:
RAILS_VERSION: '~> 7.1.0'
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ nav_order: 5

## main

* Defer to built-in caching for language environment setup, rather than manually using `actions/cache` in CI.

*Simon Fish*

* Add test coverage for use of `turbo_stream` helpers in components when `capture_compatibility_patch_enabled` is `true`.

*Simon Fish*
Expand Down
Loading