Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run GitHub Actions on PRs #159

Merged
merged 1 commit into from
Sep 4, 2024
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
35 changes: 26 additions & 9 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
name: Integration Tests

on: [push]
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
test-branch: [rails5, rails6, rails7]
test-branch: [rails6, rails7, rails7-shakapacker]
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
ref: ${{ matrix.test-branch }}
path: test_app
- name: Set up Ruby 2.7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
ruby-version: 3.3.4
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}}'"
Expand All @@ -41,6 +47,17 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/test_app
bundle install --jobs 4 --retry 3
- name: Set up Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
if: matrix.test-branch == 'rails7-shakapacker'
- name: Generate Shakapacker config
run: |
cd $GITHUB_WORKSPACE/test_app
yarn install --check-files
bundle exec rake shakapacker:compile
if: matrix.test-branch == 'rails7-shakapacker'
- name: Test
run: |
cd $GITHUB_WORKSPACE/test_app
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/rails_6_webpacker_integration_tests.yaml

This file was deleted.

16 changes: 11 additions & 5 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: Ruby

on: [push]
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:

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