Repository navigation
91 lines (76 loc) · 2.74 KB
/
Copy pathlint.yml
File metadata and controls
91 lines (76 loc) · 2.74 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Lint
on:
push:
pull_request:
workflow_call:
jobs:
lint-go:
runs-on: ubuntu-latest
strategy:
matrix:
module: [api, apps/rlark, apps/embodied-runtime]
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "${{ matrix.module }}/go.mod"
cache: true
- name: golangci-lint (${{ matrix.module }})
uses: golangci/golangci-lint-action@v6
with:
version: latest
install-mode: goinstall
working-directory: ${{ matrix.module }}
args: --timeout 5m
lint-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: apps/rlark-ui/package-lock.json
- name: Install dependencies
working-directory: apps/rlark-ui
run: npm ci
- name: Run lint
working-directory: apps/rlark-ui
run: make lint
- name: Run prettier
working-directory: apps/rlark-ui
run: npx prettier --check 'src/' 'index.html' 'package.json' 'vite.config.ts' 'tsconfig*.json'
lint-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: apps/rlark/docs/requirements.txt
- name: Install dependencies
run: python -m pip install --requirement apps/rlark/docs/requirements.txt
- name: Build documentation
run: mkdocs build --strict --config-file apps/rlark/mkdocs.yml
- name: Check Markdown internal links
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2
with:
args: --offline --no-progress --root-dir "${{ github.workspace }}" 'apps/rlark/docs/**/*.md'
lycheeVersion: v0.24.2
- name: Build Chinese Read the Docs output
env:
READTHEDOCS_CANONICAL_URL: https://rlark.readthedocs.io/zh-cn/latest/
READTHEDOCS_LANGUAGE: zh-cn
READTHEDOCS_VERSION: latest
run: |
python apps/rlark/docs/rtd_patch.py
mkdocs build --strict --config-file apps/rlark/mkdocs.yml --site-dir "$GITHUB_WORKSPACE/site-rtd-zh"
grep -F 'src="images/logo-zh.png"' site-rtd-zh/index.html
grep -F 'src="images/architecture-zh.svg"' site-rtd-zh/index.html
grep -F 'src="../images/architecture-zh.svg"' site-rtd-zh/architecture/index.html
test -f site-rtd-zh/images/logo-zh.png
test -f site-rtd-zh/images/architecture-zh.svg