Skip to content

Commit

Permalink
Merge pull request #15 from Earlopain/github-actions
Browse files Browse the repository at this point in the history
Move to GitHub actions
  • Loading branch information
koic authored May 30, 2024
2 parents 9196823 + 7752d5c commit b8b1892
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 62 deletions.
61 changes: 0 additions & 61 deletions .circleci/config.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
pull_request:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- "2.4"
- "2.5"
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- ruby-head
task:
- spec
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
8 changes: 7 additions & 1 deletion spec/rubocop/cop/rubycw/rubycw_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

RSpec.describe RuboCop::Cop::Rubycw::Rubycw, :config do
it 'registers an offense with ruby -cw' do
literal_unused_warning = if RUBY_VERSION < "3.3"
"unused literal ignored"
else
"possibly useless use of a literal in void context"
end

expect_offense(<<~RUBY)
1
^ unused literal ignored
^ #{literal_unused_warning}
p 1
p if /re/
Expand Down

0 comments on commit b8b1892

Please sign in to comment.