-
Notifications
You must be signed in to change notification settings - Fork 109
85 lines (74 loc) · 2.15 KB
/
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Test Grover Ruby gem
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
remote-chrome:
image: browserless/chrome:latest
ports:
- 3000:3000
strategy:
fail-fast: false
matrix:
ruby-version: ['3.3']
node-version: ['18']
puppeteer-version: [
'18.2.1',
'19.11.1',
'20.9.0',
'21.9.0',
'22.15.0',
'23.8.0',
]
include:
- ruby-version: '3.0'
node-version: '18'
puppeteer-version: '23.8.0'
- ruby-version: '3.1'
node-version: '18'
puppeteer-version: '23.8.0'
- ruby-version: '3.2'
node-version: '18'
puppeteer-version: '23.8.0'
- ruby-version: '3.3'
node-version: '20'
puppeteer-version: '23.8.0'
- ruby-version: '3.3'
node-version: '22'
puppeteer-version: '23.8.0'
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Puppeteer
run: npm install puppeteer@${{ matrix.puppeteer-version }}
- name: Install Imagemagick
uses: mfinelli/setup-imagemagick@v5
- name: Lint code - Rubocop
run: bundle exec rubocop
- name: Run tests
run: bundle exec rspec
env:
PUPPETEER_VERSION: ${{ matrix.puppeteer-version }}
GROVER_NO_SANDBOX: true
- name: Run tests with remote browser
run: bundle exec rspec --tag remote_browser
env:
PUPPETEER_VERSION: ${{ matrix.puppeteer-version }}
GROVER_NO_SANDBOX: true
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 5cfed40102c670b5c9e509730782b751939ddbe53fc57c317b718f635bab1ce8