Ci lint once / actually run internal_investigation
#10972
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: | |
- master | |
pull_request: | |
workflow_dispatch: | |
permissions: # added using https://github.com/step-security/secure-workflows | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
spec: | |
name: Spec - ${{ matrix.os }} ${{ matrix.ruby }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, windows] | |
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', 'head'] | |
include: | |
- os: ubuntu | |
ruby: jruby-9.4 | |
- os: windows | |
ruby: mingw | |
exclude: | |
- os: windows | |
ruby: head | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Check requiring libraries successfully | |
# See https://github.com/rubocop/rubocop/pull/4523#issuecomment-309136113 | |
run: ruby -I lib -r bundler/setup -r rubocop -e 'exit 0' | |
- name: Set up Coverage | |
# Only collect coverage data on ubuntu runners with CRuby | |
if: matrix.os == 'ubuntu' && !startsWith(matrix.ruby, 'jruby-') | |
run: echo "COVERAGE=true" >> $GITHUB_ENV | |
- name: spec | |
env: | |
CI_RUBY_VERSION: ${{ matrix.ruby }} | |
run: bundle exec rake spec | |
- name: Upload Coverage Artifact | |
if: matrix.os == 'ubuntu' && !startsWith(matrix.ruby, 'jruby-') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-${{ matrix.os }}-${{ matrix.ruby }} | |
path: coverage/.resultset.json | |
if-no-files-found: error | |
upload_coverage: | |
name: Upload Coverage | |
needs: spec | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
name: Download Coverage Artifacts | |
with: | |
pattern: coverage-* | |
- uses: paambaati/codeclimate-action@v6 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
if: ${{ env.CC_TEST_REPORTER_ID != '' }} | |
with: | |
coverageLocations: | | |
${{github.workspace}}/coverage-*/.resultset.json:simplecov | |
ascii_spec: | |
name: Ascii Spec - ${{ matrix.os }} ${{ matrix.ruby }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, windows] | |
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', 'head'] | |
include: | |
- os: ubuntu | |
ruby: jruby-9.4 | |
- os: windows | |
ruby: mingw | |
exclude: | |
- os: windows | |
ruby: head | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: ascii_spec | |
env: | |
CI_RUBY_VERSION: ${{ matrix.ruby }} | |
run: bundle exec rake ascii_spec | |
documentation_check: | |
name: Documentation Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby # Latest stable CRuby version | |
bundler-cache: true | |
- name: Check documentation syntax | |
run: bundle exec rake documentation_syntax_check | |
prism: | |
runs-on: ubuntu-latest | |
name: Prism | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
# Specify the minimum Ruby version 2.7 required for Prism to run. | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: spec | |
env: | |
PARSER_ENGINE: parser_prism | |
run: bundle exec rake prism_spec | |
rspec4: | |
runs-on: ubuntu-latest | |
name: RSpec 4 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use latest RSpec 4 from `4-0-dev` branch | |
run: | | |
sed -e "/'rspec', '~> 3/d" -i Gemfile | |
cat << EOF > Gemfile.local | |
gem 'rspec', github: 'rspec/rspec-metagem', branch: '4-0-dev' | |
gem 'rspec-core', github: 'rspec/rspec-core', branch: '4-0-dev' | |
gem 'rspec-expectations', github: 'rspec/rspec-expectations', branch: '4-0-dev' | |
gem 'rspec-mocks', github: 'rspec/rspec-mocks', branch: '4-0-dev' | |
gem 'rspec-support', github: 'rspec/rspec-support', branch: '4-0-dev' | |
EOF | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: spec | |
run: bundle exec rake spec |