Skip to content

Commit a1dd99f

Browse files
committed
Add github action to check links
1 parent 0536329 commit a1dd99f

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

.github/workflows/linkcheck.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# .github/workflows/run-htmltest.yml
2+
# (c) 2021 Robb Romans
3+
#
4+
# Run htmltest link checker on generated HTML output in dist/
5+
# https://github.com/wjdp/htmltest
6+
#
7+
name: run-htmltest
8+
concurrency:
9+
group: pullrequest-untrusted-htmltest-${{ github.event.number }}
10+
cancel-in-progress: true
11+
on: pull_request
12+
jobs:
13+
htmltest:
14+
runs-on: ubuntu-large
15+
container:
16+
image: ghcr.io/cirruslabs/flutter:latest
17+
steps:
18+
- name: Checkout Code
19+
uses: actions/checkout@v4
20+
- name: Setup Go
21+
uses: actions/setup-go@v3
22+
with:
23+
go-version: stable
24+
cache: true
25+
- name: Install doc2go
26+
run: go install go.abhg.dev/doc2go@latest
27+
- name: Generate API reference
28+
run: doc2go -out www ./...
29+
- name: Test HTML
30+
# https://github.com/wjdp/htmltest-action/
31+
# Don't fail the build on broken links
32+
continue-on-error: false
33+
uses: wjdp/htmltest-action@master
34+
with:
35+
config: .htmltest.yml
36+
- name: Archive htmltest results
37+
uses: actions/upload-artifact@v3
38+
# Note: Set ACTIONS_RUNTIME_TOKEN env variable to test with nektos/act
39+
with:
40+
name: htmltest-report
41+
path: tmp/.htmltest/htmltest.log
42+
retention-days: 7 # Default is 90 days

.htmltest.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
DirectoryPath: "www"
2+
EnforceHTTPS: true
3+
IgnoreEmptyHref: true
4+
IgnoreInternalEmptyHash: true
5+
IgnoreDirectoryMissingTrailingSlash: false
6+
IgnoreURLs:
7+
- "app.viam.com"
8+
- "fonts.gstatic.com"
9+
- "contributor-covenant.org"
10+
- "download.datasheets.com"
11+
IgnoreDirs:
12+
- "lib"
13+
CacheExpires: "6h"
14+
# IgnoreDirs: - if we need to ever ignore files
15+
CheckInternal: false
16+
CheckDoctype: false
17+
CheckScripts: false
18+
FileExtension: ".html"

spatialmath/rotationMatrix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (rm *RotationMatrix) AxisAngles() *R4AA {
3838
}
3939

4040
// Quaternion returns orientation in quaternion representation.
41-
// reference: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
41+
// reference: https://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
4242
func (rm *RotationMatrix) Quaternion() quat.Number {
4343
var q quat.Number
4444
m := rm.mat

spatialmath/rotationMatrix_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
func TestQuaternionConversion(t *testing.T) {
1313
// Test that conversion to rotation matrix to quaternion is correct
14-
// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/examples/index.htm
14+
// https://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/examples/index.htm
1515
cos45 := 0.7071067811865476
1616
cases := []struct {
1717
input [9]float64

0 commit comments

Comments
 (0)