Skip to content

Removed trailing spaces #379

Removed trailing spaces

Removed trailing spaces #379

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
min_version: 2.4
host:
needs: ruby-versions
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os:
- ubuntu-latest
- macos-latest
- windows-latest
include:
- { os: windows-latest , ruby: mingw }
- { os: windows-latest , ruby: mswin }
exclude:
- { os: macos-latest , ruby: 2.4 }
- { os: macos-latest , ruby: 2.5 }
- { os: windows-latest , ruby: head }
- { os: windows-latest , ruby: truffleruby }
- { os: windows-latest , ruby: truffleruby-head }
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake compile
# If strscan in Ruby's master has the same version of this strscan,
# "gem install pkg/*.gem" fails.
- run: bundle exec rake version:bump
if: >-
matrix.ruby == 'head' ||
matrix.ruby == 'mingw' ||
matrix.ruby == 'mswin'
- run: bundle exec rake build
- uses: actions/upload-artifact@v4
if: >-
matrix.os == 'ubuntu-latest' &&
(matrix.ruby == '3.3' || matrix.ruby == 'jruby')
with:
name: gem-${{ matrix.os }}-${{ matrix.ruby }}
path: pkg/
- name: Release
if: >-
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'ubuntu-latest' &&
(matrix.ruby == needs.ruby-version.outputs.latest || matrix.ruby == 'jruby')
run: |
ruby \
-e 'print("## strscan "); \
puts(ARGF.read.split(/^## /)[1].gsub(/ {.+?}/, ""))' \
NEWS.md > release-note.md
gh release create \
${GITHUB_REF_NAME} \
--discussion-category Announcements \
--notes-file release-note.md || :
gh release upload ${GITHUB_REF_NAME} pkg/*.gem
env:
GH_TOKEN: ${{ github.token }}
- run: bundle exec rake test
- run: gem install --verbose --backtrace pkg/*.gem
- run: gem install test-unit-ruby-core test-unit
- name: Run tests on the installed gem
run: ruby run-test.rb
if: matrix.ruby != '2.4' # strscan is a default gem from 2.5