Skip to content

Merge pull request #16 from rggen/dependabot/github_actions/actions/c… #91

Merge pull request #16 from rggen/dependabot/github_actions/actions/c…

Merge pull request #16 from rggen/dependabot/github_actions/actions/c… #91

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
rspec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.2', '3.1', '3.0', '2.7']
frozen_string_literal: ['yes', 'no']
env:
RUBYOPT: ${{ (matrix.frozen_string_literal == 'yes' && '--enable-frozen-string-literal') || '' }}
USE_GEM_PATCHED_LOCALLY: ${{ matrix.frozen_string_literal }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup RgGen env variables
run: |
echo "RGGEN_ROOT=${GITHUB_WORKSPACE}" >> ${GITHUB_ENV}
echo "RGGEN_REPOSITORY=${GITHUB_REPOSITORY#rggen/}" >> ${GITHUB_ENV}
echo "RGGEN_BRANCH=${GITHUB_REF#refs/heads/}" >> ${GITHUB_ENV}
- name: Checkout RgGen devtools
uses: actions/checkout@v4
with:
repository: rggen/rggen-devtools
path: rggen-devtools
fetch-depth: 0
- name: Checkout RgGen library list
uses: actions/checkout@v4
with:
repository: rggen/rggen-checkout
path: rggen-checkout
fetch-depth: 0
- name: Checkout RgGen libraries
run: |
${RGGEN_ROOT}/rggen-devtools/bin/checkout.rb
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run RSpec
run: |
bundle exec rake coverage
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
name: ${{ runner.os }}-${{ matrix.ruby }}-frozen_string_literal-${{ matrix.frozen_string_literal }}
file: ./coverage/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true