Skip to content

refactor(zebrad): restructure tests into module-based architecture (#… #7

refactor(zebrad): restructure tests into module-based architecture (#…

refactor(zebrad): restructure tests into module-based architecture (#… #7

Workflow file for this run

name: Docs Check
on:
push:
branches: [main]
pull_request:
merge_group:
# Ensures that only one workflow task will run at a time. Previous builds, if
# already in process, will get cancelled. Only the latest commit will be allowed
# to run, cancelling any workflows in between
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
docs_check: ${{ steps.filter.outputs.docs_check || 'true' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name == 'pull_request'
with:
persist-credentials: false
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
if: github.event_name == 'pull_request'
with:
filters: .github/path-filters.yml
# TODO: this always ends up failing due to random issues. Possibly move to a weekly job
# link-check:
# name: link-check
# permissions:
# contents: read
# pull-requests: read
# runs-on: ubuntu-latest
# timeout-minutes: 15
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
# with:
# persist-credentials: false
# - name: Restore lychee cache
# uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
# with:
# path: .lycheecache
# key: cache-lychee-${{ github.sha }}
# restore-keys: cache-lychee-
# - name: Link Checker
# uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 #v2.8.0
# with:
# args: >-
# --verbose
# --no-progress
# --cache
# --max-cache-age 1d
# --config .lychee.toml
# "**/*.md"
# fail: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
spell-check:
name: spell-check
needs: changes
if: needs.changes.outputs.docs_check == 'true'
permissions:
contents: read
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Install codespell
run: pip install codespell
- name: Run codespell
run: codespell --config .codespellrc
markdown-lint:
name: markdown-lint
needs: changes
if: needs.changes.outputs.docs_check == 'true'
permissions:
contents: read
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: "22"
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Run markdownlint
run: |
markdownlint "**/*.md" \
--ignore node_modules \
--ignore target \
--ignore .git \
--config .trunk/configs/.markdownlint.yaml
docs-check:
runs-on: ubuntu-latest
if: always()
needs:
- changes
# - link-check
- spell-check
- markdown-lint
timeout-minutes: 5
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe #v1.2.2
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: spell-check, markdown-lint