-
Notifications
You must be signed in to change notification settings - Fork 72
64 lines (61 loc) · 1.68 KB
/
integration_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Integration Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
test-branch: [rails7, rails7-shakapacker]
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout test app
uses: actions/checkout@v4
with:
repository: jamesmartin/inline_svg_test_app
ref: ${{ matrix.test-branch }}
path: test_app
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
bundler-cache: true
- name: Build local gem
run: |
bundle exec rake build
- name: Use the local gem in the test App
id: uselocalgem
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "gem 'inline_svg'"
replace: "gem 'inline_svg', path: '${{github.workspace}}'"
- name: Check local gem in use
run: |
test "${{ steps.uselocalgem.outputs.modifiedFiles }}" != "0"
grep "inline_svg" $GITHUB_WORKSPACE/test_app/Gemfile
- name: Bundle
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
bundle exec rake test