v0.7.0 #117
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, 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 |