File tree Expand file tree Collapse file tree 5 files changed +41
-50
lines changed Expand file tree Collapse file tree 5 files changed +41
-50
lines changed Original file line number Diff line number Diff line change 3737 - name : Run quality checks
3838 run : tox -e types
3939
40- link-checks :
41- runs-on : ubuntu-latest
42- strategy :
43- matrix :
44- python : ["3.9"]
45- steps :
46- - uses : actions/checkout@v4
47- - name : Set up Python
48- uses : actions/setup-python@v5
49- with :
50- python-version : ${{ matrix.python }}
51- - name : Install dependencies
52- run : pip install tox
53- - name : Run link checks
54- run : tox -e links
55-
5640 precommit-checks :
5741 runs-on : ubuntu-latest
5842 strategy :
Original file line number Diff line number Diff line change 3838 - name : Run quality checks
3939 run : tox -e types
4040
41- link -checks :
41+ precommit -checks :
4242 runs-on : ubuntu-latest
4343 strategy :
4444 matrix :
@@ -50,25 +50,33 @@ jobs:
5050 with :
5151 python-version : ${{ matrix.python }}
5252 - name : Install dependencies
53- run : pip install tox
54- - name : Run link checks
55- run : tox -e links
53+ run : pip install pre-commit
54+ - name : Run pre-commit checks
55+ run : pre-commit run --all-files
5656
57- precommit -checks :
57+ link -checks :
5858 runs-on : ubuntu-latest
59- strategy :
60- matrix :
61- python : ["3.9"]
59+ permissions :
60+ issues : write
6261 steps :
6362 - uses : actions/checkout@v4
64- - name : Set up Python
65- uses : actions/setup-python@v5
63+ - name : Link Checker
64+ id : lychee
65+ uses : lycheeverse/lychee-action@v2
6666 with :
67- python-version : ${{ matrix.python }}
68- - name : Install dependencies
69- run : pip install pre-commit
70- - name : Run pre-commit checks
71- run : pre-commit run --all-files
67+ fail : false
68+ - name : Create Issues
69+ if : steps.lychee.outputs.exit_code != '0'
70+ uses : peter-evans/create-issue-from-file@v5
71+ with :
72+ title : Link Checker Report
73+ content-filepath : ./lychee/out.md
74+ labels : report, automated issue
75+ - name : Fail on Issues
76+ if : steps.lychee.outputs.exit_code != '0'
77+ run : |
78+ echo "Link Checker found issues. Please check the created issue for details."
79+ exit 1
7280
7381 unit-tests :
7482 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 77jobs :
88 link-checks :
99 runs-on : ubuntu-latest
10- strategy :
11- matrix :
12- python : ["3.9"]
10+ permissions :
11+ issues : write
1312 steps :
1413 - uses : actions/checkout@v4
15- - name : Set up Python
16- uses : actions/setup-python@v5
14+ - name : Link Checker
15+ id : lychee
16+ uses : lycheeverse/lychee-action@v2
1717 with :
18- python-version : ${{ matrix.python }}
19- - name : Install dependencies
20- run : pip install tox
21- - name : Run link checks
22- run : tox -e links
18+ fail : false
19+ - name : Create Issues
20+ if : steps.lychee.outputs.exit_code != '0'
21+ uses : peter-evans/create-issue-from-file@v5
22+ with :
23+ title : Link Checker Report
24+ content-filepath : ./lychee/out.md
25+ labels : report, automated issue
26+ - name : Fail on Issues
27+ if : steps.lychee.outputs.exit_code != '0'
28+ run : |
29+ echo "Link Checker found issues. Please check the created issue for details."
30+ exit 1
2331
2432 unit-tests :
2533 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -61,15 +61,6 @@ commands =
6161 mypy --check-untyped-defs
6262
6363
64- [testenv:links]
65- description = Run link checks for root and docs markdown files
66- deps =
67- .[dev]
68- commands =
69- mkdocs-linkcheck ./
70- mkdocs-linkcheck docs/
71-
72-
7364[testenv:build]
7465description = Build the project
7566deps =
You can’t perform that action at this time.
0 commit comments