-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
42 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- doc/** | ||
- README.md | ||
pull_request: {} | ||
|
||
jobs: | ||
test: | ||
name: Test RGRB | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- 2.5 | ||
- 2.6 | ||
- 2.7 | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" | ||
env: | ||
RAILS_ENV: test | ||
TZ: Asia/Tokyo | ||
CC_TEST_REPORTER_ID: 74e589ede57e23f089cbbd2eee75be23a93b5ace7b5cfce58213cd3f21447147 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
# runs 'bundle install' and caches installed gems automatically | ||
bundler-cache: true | ||
- name: Setup Code Climate Test Reporter | ||
run: | | ||
wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -O ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
- name: Run tests and report the result to Code Climate | ||
run: | | ||
GIT_BRANCH=$GITHUB_REF GIT_COMMIT_SHA=$GITHUB_SHA ./cc-test-reporter before-build | ||
bin/rails test | ||
GIT_BRANCH=$GITHUB_REF GIT_COMMIT_SHA=$GITHUB_SHA ./cc-test-reporter after-build -t simplecov --exit-code $? |