diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2492d31..c2cd2d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - fix/upgrade-github-actions-v4 tags: - v[0-9]+.[0-9]+.[0-9]+* pull_request: @@ -14,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -24,7 +25,7 @@ jobs: - name: Build run: gem build *.gemspec - name: 'Upload Artifact' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gems path: '*.gem' @@ -37,7 +38,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Ruby latest uses: ruby/setup-ruby@v1 with: @@ -48,19 +49,19 @@ jobs: run: bundle exec rake - name: Upload coverage to Codecov if: ${{ matrix.ruby-version == 3.1 }} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ${{ github.workspace }}/coverage/coverage.xml publish: name: Publish - if: startsWith(github.ref, 'refs/tags/v') + # if: startsWith(github.ref, 'refs/tags/v') needs: [build, test] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: sudo apt-get install -y oathtool - name: Download all workflow run artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: gems path: gems diff --git a/test/razorpay/test_utility.rb b/test/razorpay/test_utility.rb index 0f806ff..296232e 100644 --- a/test/razorpay/test_utility.rb +++ b/test/razorpay/test_utility.rb @@ -99,11 +99,11 @@ def test_generate_onboarding_signature def decrypt(data, secret) combined_encrypted_data = [data].pack("H*") - iv = secret[0, 12] + iv = combined_encrypted_data[0, 12] key = secret[0, 16] tag = combined_encrypted_data[-16..] - encrypted_data = combined_encrypted_data[0...-16] + encrypted_data = combined_encrypted_data[12...-16] cipher = OpenSSL::Cipher.new('aes-128-gcm') cipher.decrypt