Skip to content
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
21 changes: 21 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,24 @@ jobs:
[[ "$commit" =~ ^[0-9a-f]{40}$ ]] || { echo "::error::no commit from https://api.visualci.com/status"; exit 1; }
trivy image --scanners vuln --ignore-unfixed --severity HIGH,CRITICAL --exit-code 1 --ignorefile .trivyignore.yaml \
"ghcr.io/docspring/visualci-app:$commit"

# Every link on the live site, outside ones included (lychee.toml), daily and by hand: CI checks the site's own links
# offline, so a page someone else moved or took down turns up here.
links:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0
with:
install_args: lychee
# The pages from the live sitemap. GITHUB_TOKEN keeps lychee's github.com checks inside the API's rate limit.
- env:
GITHUB_TOKEN: ${{ github.token }}
run: |
curl -fsS --retry 3 --max-time 20 https://visualci.com/sitemap.xml | grep -o '<loc>[^<]*' | cut -c6- >pages.txt
[ -s pages.txt ] || { echo "::error::no pages in https://visualci.com/sitemap.xml"; exit 1; }
lychee --format compact --files-from pages.txt
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,19 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
VISUALCI_REQUIRE_WASM: "1"
# Every page, file and #anchor the site links to is in the build, its absolute https://visualci.com/ links
# included (lychee.toml; offline, so an outside site never fails a build: the Audit workflow checks those nightly).
- uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0
with:
install_args: lychee
# The pages, their Markdown copies and llms.txt. The site's own absolute links point at the build; a Markdown copy's
# #anchor (an HTML page's id) is dropped, since a Markdown heading has none (one remap applies per link: first wins).
- run: |
site=$PWD/frontend/dist-site
lychee --offline --root-dir "$site" --format compact \
--remap "^https?://(www\.)?visualci\.com/([^#]+\.md)#.*\$ file://$site/\$2" \
--remap "^https?://(www\.)?visualci\.com/?(.*)\$ file://$site/\$2" \
"$site/**/*.html" "$site/**/*.md" "$site/llms.txt" "$site/llms-full.txt"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist-site
Expand Down
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ design is in `docs/design.md`; read it before changing the architecture, and upd
cap, never raise a cap, and delete its line once it's under the limit. **Every lint suppression** (`#[allow(...)]`,
`@ts-expect-error`, `# noqa`, a zizmor ignore and the rest) is listed in `scripts/ci/suppressions.txt` with its
reason, added in the change that adds it (`scripts/ci/check_suppressions.py`). Fix what a lint finds before you
reach for a suppression. Allow a word or turn a lint rule off for a file only in those
reach for a suppression.
- **Links are checked** by lychee (`lychee.toml`): CI's `clients` job checks every page, file and `#anchor` the built
site links to, offline, so a broken internal link fails the build that makes it. The Audit workflow checks every link
on the live site, outside ones included, each night. Exclude a link in `lychee.toml` only with the reason beside it. Allow a word or turn a lint rule off for a file only in those
files, with the reason beside it. Pin every action by commit SHA with its version in a comment (`pinact run` does
it). Ignore a zizmor finding only inline (`# zizmor: ignore[audit]`) with the reason beside it; allow a made-up
value in `.betterleaks.toml` only with a description of what it is. A real secret that reached a commit is revoked,
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ visualci build finalize
when `VISUALCI_TOKEN` is empty (pull requests from forks).
- **CircleCI:** https://visualci.com/docs/ci/circleci.md
- **GitLab CI:** https://visualci.com/docs/ci/gitlab.md
- **Buildkite, Jenkins, Bitbucket, Semaphore, TeamCity, Travis:** https://visualci.com/docs/ci/<name>.md
- **Buildkite, Jenkins, Bitbucket, Semaphore, TeamCity, Travis:** `https://visualci.com/docs/ci/<name>.md` (`buildkite`, `jenkins`, `bitbucket`, `semaphore`, `teamcity`, `travis`)
- **Anything else:** https://visualci.com/docs/ci/other.md

Parallel jobs share one build: `visualci build create --nonce <the workflow's id> --shards <n>`, and each job runs
Expand Down
20 changes: 20 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# lychee (links), run by CI's clients job over the built site (offline: every page, file and #anchor the site links
# to, its own https://visualci.com/ links included) and nightly by the Audit workflow over the live site (every link,
# outside ones too). mise.toml pins it. Exclude a link here only with the reason beside it.
include_fragments = "full"
# Pages are folders with an index.html (/docs/agents/ is docs/agents/index.html).
index_files = ["index.html"]
no_progress = true
max_concurrency = 8
exclude = [
# Sign-in pages and API endpoints answer only signed-in or API requests. The app's public pages (galleries, the
# demo) are still checked.
'^https://app\.visualci\.com/(auth|api|oauth)/',
'^https://(api|mcp)\.visualci\.com',
]
remap = [
# GitHub builds a repository page's #readme anchor in JavaScript, so it's never in the HTML lychee reads.
'^(https://github\.com/[^#]+)#readme$ $1',
# The Markdown copies (for agents) link anchors by their HTML pages' ids, which a Markdown heading doesn't have.
'^(https://visualci\.com/[^#]+\.md)#.*$ $1',
]
1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ trivy = "0.77.0"
hadolint = "2.15.1"
typos = "1.53.0"
oxlint = "1.96.0"
lychee = "0.24.2"
Loading