✨ add support for image & PDF compression (#120) #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Run Integration tests. | |
# | |
name: Integration Tests | |
on: | |
- push | |
jobs: | |
tests: | |
name: Test ${{ matrix.os }}, Ruby ${{ matrix.ruby }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- "ubuntu-22.04" | |
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 for integration tests | |
env: | |
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }} | |
run: | | |
bundle exec rake integration |