Skip to content

Commit 593731d

Browse files
authored
Add separate Webpacker integration test for Rails6
This proved too unreliable to mix with the other Rails versions (matrix workflows all fail if one fails). If somebody wants to figure out why this doesn't work, be my guest. As Webpacker is no longer the Rails way (as of 7), I'm less concerned about this.
1 parent d03a4b7 commit 593731d

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Rails 6 Webpacker Integration Tests (unreliable)
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
test-branch: [rails6-webpacker]
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Checkout test app
16+
uses: actions/checkout@v2
17+
with:
18+
repository: jamesmartin/inline_svg_test_app
19+
ref: ${{ matrix.test-branch }}
20+
path: test_app
21+
- name: Set up Ruby 2.7
22+
uses: actions/setup-ruby@v1
23+
with:
24+
ruby-version: 2.7.x
25+
- name: Build local gem
26+
run: |
27+
gem install bundler
28+
bundle install --jobs 4 --retry 3
29+
bundle exec rake build
30+
- name: Use the local gem in the test App
31+
id: uselocalgem
32+
uses: jacobtomlinson/[email protected]
33+
with:
34+
find: "gem 'inline_svg'"
35+
replace: "gem 'inline_svg', path: '${{github.workspace}}'"
36+
- name: Check local gem in use
37+
run: |
38+
test "${{ steps.uselocalgem.outputs.modifiedFiles }}" != "0"
39+
grep "inline_svg" $GITHUB_WORKSPACE/test_app/Gemfile
40+
- name: Bundle
41+
run: |
42+
cd $GITHUB_WORKSPACE/test_app
43+
bundle install --jobs 4 --retry 3
44+
- name: Set up Node.js 16.x
45+
uses: actions/setup-node@v2
46+
with:
47+
node-version: 16
48+
if: matrix.test-branch == 'rails6-webpacker'
49+
- name: Generate Webpacker config
50+
run: |
51+
cd $GITHUB_WORKSPACE/test_app
52+
yarn install --check-files
53+
bundle exec rake webpacker:compile
54+
if: matrix.test-branch == 'rails6-webpacker'
55+
- name: Test
56+
run: |
57+
cd $GITHUB_WORKSPACE/test_app
58+
bundle exec rake test

0 commit comments

Comments
 (0)