generated from actions/container-action
-
-
Notifications
You must be signed in to change notification settings - Fork 3
96 lines (82 loc) · 2.28 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
86
87
88
89
90
91
92
93
94
95
96
name: Test action
on:
push:
branches:
- master
paths:
- .github/workflows/test.yml
- action.yml
pull_request:
types: [ opened, synchronize, reopened ] # Same as default
paths:
- .github/workflows/test.yml
- action.yml
workflow_run:
workflows: [ Docker build ]
types: [ completed ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Test expect to match
uses: ./
with:
file1: test/expected.pdf
file2: test/actual.pdf
options: --verbose
- name: Test no options
uses: ./
with:
file1: test/expected.pdf
file2: test/actual.pdf
- name: Test view the difference
uses: ./
with:
file1: test/a.pdf
file2: test/b.pdf
options: --skip-identical --output-diff=test/diff.pdf --dpi=100
suppress-diff-error: true
- name: Generate diff rendered in Japanese font with Re:VIEW
uses: ./
with:
file1: test/review_japanese_1.pdf
file2: test/review_japanese_2.pdf
options: --output-diff=test/review_japanese_diff.pdf
suppress-diff-error: true
- name: Verify diff rendered in Japanese font with Re:VIEW
uses: ./
with:
file1: test/review_japanese_diff_expected.pdf
file2: test/review_japanese_diff.pdf
options: --verbose
- uses: actions/upload-artifact@v3
with:
name: Output diff PDFs
path: test/*diff.pdf
if: always()
test-on-container:
runs-on: ubuntu-latest
permissions:
contents: read
container:
image: ghcr.io/nowsprinting/diff-pdf:latest
steps:
- uses: actions/checkout@v4
- run: diff-pdf --verbose test/expected.pdf test/actual.pdf
notify:
needs: [ test, test-on-container ]
if: failure()
runs-on: ubuntu-latest
permissions:
actions: read
steps:
- uses: Gamesight/slack-workflow-status@v1.2.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}