Skip to content

Commit

Permalink
Setup GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Sep 17, 2023
1 parent 53ce34a commit 4c58b97
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on: [push, pull_request]

jobs:
test:
name: RSpec
strategy:
fail-fast: false
matrix:
ruby: [ '2.2', '3.2' ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run RSpec
run: bundle exec rake spec
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/_yardoc/
/coverage/
/doc/
/log/
/pkg/
/spec/reports/
/tmp/
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source 'https://rubygems.org'

gem 'loofah', '~>2.19.1'

gemspec
10 changes: 5 additions & 5 deletions spec/locale_loading_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
expected_translations = <<-EOS.gsub(/^ */, "")
In French: Impossible de redimensionner l'image.
In Spanish: no pudo ser procesado
In Japanese: translation missing: ja.errors.messages.carrierwave_processing_error
In Japanese: Translation missing: ja.errors.messages.carrierwave_processing_error
EOS

expect(translations).to eq(expected_translations)
expect(translations.gsub('translation missing', 'Translation missing')).to eq(expected_translations)
end
end

Expand All @@ -43,11 +43,11 @@
it "loads only this locale" do
expected_translations = <<-EOS.gsub(/^ */, "")
In French: Impossible de redimensionner l'image.
In Spanish: translation missing: es.errors.messages.carrierwave_processing_error
In Japanese: translation missing: ja.errors.messages.carrierwave_processing_error
In Spanish: Translation missing: es.errors.messages.carrierwave_processing_error
In Japanese: Translation missing: ja.errors.messages.carrierwave_processing_error
EOS

expect(translations).to eq(expected_translations)
expect(translations.gsub('translation missing', 'Translation missing')).to eq(expected_translations)
end
end

Expand Down

0 comments on commit 4c58b97

Please sign in to comment.