diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 28b8032..1bb7687 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -1,6 +1,13 @@ name: Integration Tests -on: [push] +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read jobs: build: @@ -11,25 +18,24 @@ jobs: timeout-minutes: 20 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Checkout test app - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - repository: jamesmartin/inline_svg_test_app + repository: tagliala/inline_svg_test_app ref: ${{ matrix.test-branch }} path: test_app - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: ruby-version: 2.7.7 + bundler-cache: true - name: Build local gem run: | - gem install bundler - bundle install --jobs 4 --retry 3 bundle exec rake build - name: Use the local gem in the test App id: uselocalgem - uses: jacobtomlinson/gha-find-replace@0.1.1 + uses: jacobtomlinson/gha-find-replace@v3 with: find: "gem 'inline_svg'" replace: "gem 'inline_svg', path: '${{github.workspace}}'" diff --git a/.github/workflows/rails_6_webpacker_integration_tests.yaml b/.github/workflows/rails_7_shakapacker_integration_tests.yaml similarity index 53% rename from .github/workflows/rails_6_webpacker_integration_tests.yaml rename to .github/workflows/rails_7_shakapacker_integration_tests.yaml index 05149bc..c86ebd2 100644 --- a/.github/workflows/rails_6_webpacker_integration_tests.yaml +++ b/.github/workflows/rails_7_shakapacker_integration_tests.yaml @@ -1,6 +1,13 @@ -name: Rails 6 Webpacker Integration Tests (unreliable) +name: Rails 7 Shakapacker Integration Tests -on: [push] +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read jobs: build: @@ -8,28 +15,27 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - test-branch: [rails6-webpacker] + test-branch: [rails7-shakapacker] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Checkout test app - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - repository: jamesmartin/inline_svg_test_app + repository: tagliala/inline_svg_test_app ref: ${{ matrix.test-branch }} path: test_app - - name: Set up Ruby 3.1 + - name: Set up Ruby 3.3 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1 + ruby-version: '3.3' + bundler-cache: true - name: Build local gem run: | - gem install bundler - bundle install --jobs 4 --retry 3 bundle exec rake build - name: Use the local gem in the test App id: uselocalgem - uses: jacobtomlinson/gha-find-replace@0.1.1 + uses: jacobtomlinson/gha-find-replace@v3 with: find: "gem 'inline_svg'" replace: "gem 'inline_svg', path: '${{github.workspace}}'" @@ -41,21 +47,17 @@ jobs: run: | cd $GITHUB_WORKSPACE/test_app bundle install --jobs 4 --retry 3 - - name: Set up Node.js 16.x - uses: actions/setup-node@v2 - with: - node-version: 16 - if: matrix.test-branch == 'rails6-webpacker' - - name: Set up Python 2.7 - uses: actions/setup-python@v4 + - name: Set up Node.js 20.x + uses: actions/setup-node@v4 with: - python-version: '2.7' - - name: Generate Webpacker config + node-version: 20 + if: matrix.test-branch == 'rails7-shakapacker' + - name: Generate Shakapacker config run: | cd $GITHUB_WORKSPACE/test_app - CXXFLAGS="--std=c++17" yarn install --check-files - bundle exec rake webpacker:compile - if: matrix.test-branch == 'rails6-webpacker' + yarn install --check-files + bundle exec rake shakapacker:compile + if: matrix.test-branch == 'rails7-shakapacker' - name: Test run: | cd $GITHUB_WORKSPACE/test_app diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 4b983f0..7f795a0 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,6 +1,13 @@ name: Ruby -on: [push] +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read jobs: build: @@ -8,13 +15,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: ruby-version: 2.7.7 - - name: Build and test with Rake + bundler-cache: true + - name: Test with Rake run: | - gem install bundler - bundle install --jobs 4 --retry 3 bundle exec rake