Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: true
- name: Run rubocop
run: bin/rubocop

tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- 3.2
- 3.3
- 3.4
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bin/rails test
2 changes: 1 addition & 1 deletion test/jobs/action_push_native/notification_job_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class NotificationJobTest < ActiveSupport::TestCase

test "Socket errors are retried" do
device = action_push_native_devices(:pixel9)
Net::HTTP.any_instance.stubs(:request).raises(Socket::ResolutionError)
Net::HTTP.any_instance.stubs(:request).raises(SocketError)
ActionPushNative::Service::Fcm.any_instance.stubs(:access_token).returns("fake_access_token")

assert_enqueued_jobs 1, only: ActionPushNative::NotificationJob do
Expand Down