-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.26 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
#
# Run unit tests.
#
name: Tests
on:
- push
jobs:
tests:
name: Test ${{ matrix.os }}, Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- "ubuntu-22.04"
- "ubuntu-20.04"
- "macos-latest"
ruby:
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install Ghostscript on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt-get install -y ghostscript
- name: Install Ghostscript and ImageMagick on macOS
if: runner.os == 'macOS'
run: brew install ghostscript imagemagick
- name: Change ImageMagick security policy on Ubuntu
if: runner.os == 'Linux'
run: |
DQT='"'
SRC="rights=${DQT}none${DQT} pattern=${DQT}PDF${DQT}"
RPL="rights=${DQT}read|write${DQT} pattern=${DQT}PDF${DQT}"
sudo sed -i "s/$SRC/$RPL/" /etc/ImageMagick-6/policy.xml
- name: Run Rspec
run: |
bundle exec rake spec