-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a job to exercise the script in CI by generating a throwaway PDF document and then running shrinkpdf on it. This will guard against any inadvertent breakage by future commits.
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
Test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Checkout the code. | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# Install the test dependencies. | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install ghostscript | ||
sudo apt install librsvg2-bin | ||
sudo apt install texlive-latex-recommended | ||
sudo apt install texlive-latex-extra | ||
sudo apt install pandoc | ||
# Generate a test PDF by using the README as a convenient source. | ||
- name: Generate test PDF | ||
run: pandoc -s -o orig.pdf README.md | ||
|
||
# Shrink the PDF. | ||
- name: Shrink the PDF | ||
run: | | ||
chmod +x shrinkpdf.sh | ||
./shrinkpdf.sh orig.pdf new.pdf | ||
ls -al orig.pdf new.pdf |
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