Skip to content

Commit

Permalink
Run benchmarks in CI (#1027)
Browse files Browse the repository at this point in the history
@andrewjtait recently pointed out that our benchmarks were broken.
In order to prevent this from happening again, let's run them in CI.
  • Loading branch information
joelhawksley authored Aug 3, 2021
1 parent a92a063 commit fe12116
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ jobs:
bundle install --jobs 4 --retry 3
bundle exec rubocop
bundle exec erblint **/*.html.erb
benchmark:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: gems-build-rails-main-ruby-2.7.2-${{ hashFiles('**/Gemfile.lock') }}
- name: Run benchmarks
run: |
bundle config path vendor/bundle
bundle update
bundle exec rake benchmark
bundle exec rake translatable_benchmark
bundle exec rake slotable_benchmark
test:
needs: lint
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ title: Changelog

*Andrew Tait*

* Run benchmarks in CI.

*Joel Hawksley*

## 2.36.0

* Add `slot_type` helper method.
Expand Down
2 changes: 1 addition & 1 deletion performance/components/inline_component.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class InlineComponent < ViewComponent::Base
class Performance::InlineComponent < ViewComponent::Base
def initialize(name:)
@name = name
end
Expand Down

0 comments on commit fe12116

Please sign in to comment.