-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2787d9e
commit 08bb58e
Showing
1 changed file
with
9 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
env: | ||
RUBY_VERSION: 2.7 | ||
CC_TEST_REPORTER_ID: 56be13323186b8153f0a26ee08541776d3dc3091ef3a64aa3d663f77f8b0e095 | ||
RUBY_VERSION: 3.0 | ||
|
||
name: Build | ||
on: | ||
|
@@ -15,9 +14,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-ruby@v1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
- name: Install Rubocop | ||
run: gem install rubocop rubocop-rails rubocop-rspec | ||
- name: Check code | ||
|
@@ -26,29 +26,14 @@ jobs: | |
rspec-test: | ||
name: RSpec | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby: ['3.0', '3.1', '3.2'] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-ruby@v1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
- name: Ruby gem cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- name: Install Ruby gems | ||
run: | | ||
gem install bundler | ||
bundle config path vendor/bundle | ||
bundle install | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run tests | ||
run: bundle exec rspec | ||
- name: Send results to Code Climate | ||
uses: paambaati/[email protected] | ||
if: ${{ env.CC_TEST_REPORTER_ID }} | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ env.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: ls |