CI - add ruby 3.3 #94
Workflow file for this run
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: "CI" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
RUBY_MAIN_VERSION: "3.3" | |
jobs: | |
rubocop: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@360dc864d5da99d54fcb8e9148c14a84b90d3e88 #v1.165.1 | |
with: | |
bundler-cache: true | |
ruby-version: ${{ env.RUBY_MAIN_VERSION }}.0 | |
- name: Install Bundler | |
run: gem install bundler | |
- name: Bundle Install | |
run: bundle install | |
- name: Rubocop | |
run: bundle exec rubocop | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
ruby_version: ["3.0", "3.1", "3.2", "3.3"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@360dc864d5da99d54fcb8e9148c14a84b90d3e88 #v1.165.1 | |
with: | |
bundler-cache: true | |
ruby-version: ${{ matrix.ruby_version }} | |
- name: Install Bundler | |
run: gem install bundler | |
- name: Setup Code Climate test-reporter | |
if: ${{ matrix.ruby_version == env.RUBY_MAIN_VERSION }} | |
run: | | |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
chmod +x ./cc-test-reporter | |
- name: Bundle Install | |
run: bundle install | |
- name: Test | |
run: bundle exec rspec | |
- name: Publish Codeclimate Code Coverage | |
if: ${{ matrix.ruby_version == env.RUBY_MAIN_VERSION }} | |
run: | | |
./cc-test-reporter format-coverage -t lcov | |
./cc-test-reporter upload-coverage -r ${{secrets.CC_TEST_REPORTER_ID}} | |
- name: Coveralls Parallel | |
if: ${{ matrix.ruby_version == env.RUBY_MAIN_VERSION }} | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} |