Merge pull request #150 from maedana/upgrade-github-linguist #161
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
name: Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
codeclimate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get branch names | |
id: branch-name | |
uses: tj-actions/[email protected] | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: Test & publish code coverage | |
if: "${{ env.CC_TEST_REPORTER_ID != '' }}" | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
GIT_BRANCH: ${{ steps.branch-name.outputs.current_branch }} | |
GIT_COMMIT_SHA: ${{ github.sha }} | |
with: | |
coverageCommand: bundle exec rake | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest'] | |
ruby: ['3.0', '3.1'] | |
experimental: [false] | |
include: | |
- os: 'ubuntu-latest' | |
ruby: 'head' | |
experimental: true | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Test | |
run: bundle exec rake |