Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create linkcheck.yml #234

Merged
merged 7 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# .github/workflows/run-htmltest.yml
# (c) 2021 Robb Romans
#
# Run htmltest link checker on generated HTML output in dist/
# https://github.com/wjdp/htmltest
#
name: run-htmltest-external
concurrency:
group: pullrequest-untrusted-htmltest-${{ github.event.number }}
cancel-in-progress: true
on: pull_request
jobs:
htmltest:
runs-on: ubuntu-large
container:
image: ghcr.io/cirruslabs/flutter:latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Flutter
run: flutter pub get

- name: Generate docs
run: dart doc

- name: Test HTML
# https://github.com/wjdp/htmltest-action/
# Don't fail the build on broken links
continue-on-error: false
uses: wjdp/htmltest-action@master
with:
config: .htmltest.yml
- name: Archive htmltest results
uses: actions/upload-artifact@v3
# Note: Set ACTIONS_RUNTIME_TOKEN env variable to test with nektos/act
with:
name: htmltest-report
path: tmp/.htmltest/htmltest.log
retention-days: 7 # Default is 90 days
11 changes: 11 additions & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DirectoryPath: "dist"
npentrel marked this conversation as resolved.
Show resolved Hide resolved
EnforceHTTPS: true
IgnoreEmptyHref: true
IgnoreInternalEmptyHash: true
IgnoreDirectoryMissingTrailingSlash: false
IgnoreURLs:
- "app.viam.com"
npentrel marked this conversation as resolved.
Show resolved Hide resolved
IgnoreDirs:
- "lib"
CacheExpires: "6h"
# IgnoreDirs: - if we need to ever ignore files