From 9e57196ebdeaedf9edc168a1a0de9c175e50479c Mon Sep 17 00:00:00 2001 From: Jacopo Date: Fri, 19 Sep 2025 16:55:52 +0200 Subject: [PATCH 1/2] GH actions --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e7a0a14 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 From 26bd83ee9715e4b7bb4c52da634c32313d671a16 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Fri, 19 Sep 2025 17:11:27 +0200 Subject: [PATCH 2/2] Fix test in 3.2 --- test/jobs/action_push_native/notification_job_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jobs/action_push_native/notification_job_test.rb b/test/jobs/action_push_native/notification_job_test.rb index 32f751d..cbeaa02 100644 --- a/test/jobs/action_push_native/notification_job_test.rb +++ b/test/jobs/action_push_native/notification_job_test.rb @@ -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