-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.61 KB
/
Copy pathdocs-check.yml
File metadata and controls
54 lines (46 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Docs Check
on:
pull_request:
branches: [develop]
push:
branches: [develop]
permissions:
contents: read
jobs:
check:
name: Docs Check
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: '22.19.0'
- name: Test workflow automation
run: node --test .github/tests/*.test.cjs
- name: Validate labeler JSON
run: python -m json.tool .github/labeler.json > /tmp/labeler.json
- name: Check required templates
run: |
test -f .github/pull_request_template.md
test -f .github/ISSUE_TEMPLATE/task_issue.md
test -f .github/ISSUE_TEMPLATE/test_task_issue.md
test -f docs/collaboration/repository-setup.md
test -f docs/collaboration/task-issue-project-workflow.md
test -f docs/testing/templates/test-report-template.md
- name: Check whitespace
env:
EVENT_NAME: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
if [[ "$EVENT_NAME" == "push" && "$BASE_SHA" =~ ^0+$ ]]; then
git show --check --format= "$HEAD_SHA"
else
git diff --check "$BASE_SHA...$HEAD_SHA"
fi