-
-
Notifications
You must be signed in to change notification settings - Fork 49
93 lines (80 loc) · 2.14 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
on:
- repository_dispatch
- workflow_dispatch
- push
- pull_request
jobs:
lychee-action:
runs-on: ubuntu-latest
continue-on-error: true
name: Test the lychee link checker action
steps:
- name: Checkout
uses: actions/checkout@v4
- name: test defaults
uses: ./
with:
fail: true
- name: test explicit lychee version
uses: ./
with:
lycheeVersion: 0.9.0
- name: test globs
uses: ./
with:
args: >-
--exclude-mail
--verbose
--no-progress
'./**/*.md'
'./**/*.html'
'./**/*.rst'
fail: true
- name: Install jq
run: sudo apt-get install jq
- name: test workflow inputs - Markdown
uses: ./
with:
args: -v fixtures/TEST.md
format: json
output: ${{ github.workspace }}/foo_md.json
fail: true
- name: Validate JSON - Markdown
run: |
if ! jq empty ${{ github.workspace }}/foo_md.json; then
echo "Output file does not exist or is not valid JSON"
exit 1
fi
- name: test workflow inputs - rST
uses: ./
with:
args: -v fixtures/TEST.rst
format: json
output: ${{ github.workspace }}/foo_rst.json
fail: true
- name: Validate JSON - rST
run: |
if ! jq empty ${{ github.workspace }}/foo_rst.json; then
echo "Output file does not exist or is not valid JSON"
exit 1
fi
- name: directory
uses: ./
with:
args: --exclude-mail .
fail: true
- name: test format override
uses: ./
with:
args: --format markdown -v fixtures/TEST.md
format: doesnotexist # gets ignored if format set in args
output: ${{ github.workspace }}/foo.txt
fail: true
- name: test debug
uses: ./
with:
debug: true
- name: test custom GitHub token
uses: ./
with:
token: ${{ secrets.CUSTOM_TOKEN }}