ci: add monorepo lint workflow
Some checks failed
Lint & Format / detect (push) Has been cancelled
Lint & Format / js-lint (push) Has been cancelled
Lint & Format / py-lint (push) Has been cancelled
Lint & Format / sh-lint (push) Has been cancelled
Lint & Format / go-lint (push) Has been cancelled
Monorepo Lint / lint-shell (push) Has been cancelled
Monorepo Lint / lint-js (push) Has been cancelled
Some checks failed
Lint & Format / detect (push) Has been cancelled
Lint & Format / js-lint (push) Has been cancelled
Lint & Format / py-lint (push) Has been cancelled
Lint & Format / sh-lint (push) Has been cancelled
Lint & Format / go-lint (push) Has been cancelled
Monorepo Lint / lint-shell (push) Has been cancelled
Monorepo Lint / lint-js (push) Has been cancelled
This commit is contained in:
36
.gitea/workflows/lint.yml
Normal file
36
.gitea/workflows/lint.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Monorepo Lint
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-shell:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install ShellCheck
|
||||||
|
run: sudo apt-get install -y shellcheck
|
||||||
|
- name: Lint shell scripts
|
||||||
|
run: |
|
||||||
|
find bin/ scripts/ -name '*.sh' -type f | head -50 | while read f; do
|
||||||
|
shellcheck -S warning "$f" || true
|
||||||
|
done
|
||||||
|
- name: Syntax check all scripts
|
||||||
|
run: |
|
||||||
|
find bin/ scripts/ -name '*.sh' -type f -exec bash -n {} \;
|
||||||
|
echo "All scripts pass syntax check"
|
||||||
|
|
||||||
|
lint-js:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
- name: Check worker JS syntax
|
||||||
|
run: |
|
||||||
|
find workers/ -name '*.js' -type f | while read f; do
|
||||||
|
node --check "$f" && echo " OK: $f" || echo " FAIL: $f"
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user