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

Add github action to check links on schedule #4108

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
63 changes: 63 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# .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
on:
schedule:
# 10am UTC on weekdays
- cron: '0 10 * * 1,2,3,4,5'
jobs:
htmltest:
runs-on: ubuntu-large
container:
image: ghcr.io/cirruslabs/flutter:latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: stable
cache: true
- name: Install doc2go
run: go install go.abhg.dev/doc2go@latest
- name: Generate API reference
run: doc2go -out www ./...
- 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
- name: Login to Jira
if: failure()
uses: atlassian/gajira-login@v3
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Create Jira ticket
if: failure()
id: create
uses: atlassian/gajira-create@v3
env:
GITHUB_RUN_ID: ${{ github.run_id }}
with:
project: DOCS
issuetype: Bug
summary: Broken link detected
description: "For more info see https://github.com/viamrobotics/docs/actions/runs/${{ env.GITHUB_RUN_ID }}."
- name: Log created Jira issue
if: failure()
run: echo "Issue ${{ steps.create.outputs.issue }} was created"
18 changes: 18 additions & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
DirectoryPath: "www"
EnforceHTTPS: true
IgnoreEmptyHref: true
IgnoreInternalEmptyHash: true
IgnoreDirectoryMissingTrailingSlash: false
IgnoreURLs:
- "app.viam.com"
- "fonts.gstatic.com"
- "contributor-covenant.org"
- "download.datasheets.com"
IgnoreDirs:
- "lib"
CacheExpires: "6h"
# IgnoreDirs: - if we need to ever ignore files
CheckInternal: false
CheckDoctype: false
CheckScripts: false
FileExtension: ".html"
2 changes: 1 addition & 1 deletion spatialmath/rotationMatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (rm *RotationMatrix) AxisAngles() *R4AA {
}

// Quaternion returns orientation in quaternion representation.
// reference: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
// reference: https://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
func (rm *RotationMatrix) Quaternion() quat.Number {
var q quat.Number
m := rm.mat
Expand Down
2 changes: 1 addition & 1 deletion spatialmath/rotationMatrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

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