cy0307's picture
Sync awesome-loop-engineering
9ec4919 verified
Raw
History Blame Contribute Delete
2.33 kB
name: Quality
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "17 3 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: quality-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
name: Docs quality gates
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Check Markdown formatting
uses: DavidAnson/markdownlint-cli2-action@v17
with:
globs: "**/*.md"
- name: Check Awesome list standards
run: npx --yes awesome-lint
- name: Check license text
run: python scripts/check_license.py
- name: Check resource type labels
run: python scripts/check_resource_labels.py README.md
- name: Check loop contract examples
run: |
python scripts/check_loop_contract_examples.py
python scripts/preview_loop_contract.py examples/pr-babysitter-loop.json >/tmp/pr-babysitter-preview.md
- name: Check Pages metadata
run: python scripts/check_pages_metadata.py
- name: Check internal links
run: python scripts/check_internal_links.py
- name: Check translation sync markers
run: python scripts/check_translation_sync.py
- name: Check links
run: python scripts/verify_urls.py . --timeout 12 --workers 20
- name: Check main commit identity
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: python scripts/check_commit_identity.py
- name: Open an issue when a scheduled run fails
if: failure() && github.event_name == 'schedule'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue create \
--repo "$GITHUB_REPOSITORY" \
--title "Scheduled quality run failed on $(date -u +%Y-%m-%d)" \
--body "The weekly quality workflow failed, most likely a dead link or a stale translation sync marker. See the run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"