Skip to content

Add workflow for releasing gem #226

Add workflow for releasing gem

Add workflow for releasing gem #226

Workflow file for this run

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/branch-names@dde14ac574a8b9b1cedc59a1cf312788af43d8d8 # v8.2.1
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0
with:
ruby-version: '3.2'
bundler-cache: true
- name: Test & publish code coverage
if: "${{ env.CC_TEST_REPORTER_ID != '' }}"
uses: paambaati/codeclimate-action@7bcf9e73c0ee77d178e72c0ec69f1a99c1afc1f3 # v2.7.5
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.2', '3.3', '3.4']
experimental: [false]
include:
- os: 'ubuntu-latest'
ruby: 'head'
experimental: true
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Test
run: bundle exec rake