-
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
1 parent
aa1b8a7
commit e219f5f
Showing
1 changed file
with
17 additions
and
32 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,48 +1,33 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | ||
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | ||
|
||
name: Ruby | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
permissions: | ||
contents: read | ||
branches: ['**'] | ||
|
||
jobs: | ||
test: | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby-version: ['2.6', '2.7', '3.0', '3.1', 'ruby-head'] | ||
|
||
ruby: [ '2.7', '3.0', '3.1', '3.2', 'ruby-head' ] | ||
name: Ruby ${{ matrix.ruby }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: Set TESTOPTS | ||
run: "echo $TESTOPTS" | ||
if: matrix.ruby-version == 'ruby-head' | ||
env: | ||
TESTOPTS: "-A test/allowed.yml" | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Install dependencies | ||
run: bundle install --jobs 4 --retry 3 | ||
- uses: amancevice/setup-code-climate@v1 | ||
with: | ||
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
- run: cc-test-reporter before-build | ||
- name: Run tests | ||
env: | ||
CC_TEST_REPORTER_ID: "7cf83cb3647a2969a1af2e1bbe49155388ad3a8ff45e6b0ec9be6c1c65ea9b96" | ||
run: bundle exec rake | ||
- name: Upload coverage results | ||
uses: actions/upload-artifact@master | ||
if: always() | ||
with: | ||
name: coverage-report | ||
path: coverage | ||
- run: cc-test-reporter after-build | ||
if: ${{ github.event_name != 'pull_request' }} |