mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-05 05:27:35 +08:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: ❄️ Lint
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
trailing-whitespace:
|
|
name: 🌌 Trailing whitespace
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 1
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
- name: 🧹 Check for trailing whitespace
|
|
run: "! git grep -EIn $'[ \t]+$'"
|
|
misc:
|
|
name: misc checker
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code.
|
|
uses: actions/checkout@v2.3.5
|
|
- name: Install
|
|
run: |
|
|
wget -O - -q https://git.io/misspell | sh -s -- -b .
|
|
- name: Misspell
|
|
run: |
|
|
git ls-files | grep -v "docs/es" | grep -v "t/toolkit" | xargs ./misspell -error
|
|
- name: Merge conflict
|
|
run: |
|
|
grep "^<<<<<<< HEAD" $(git ls-files | grep -v "t/toolkit" | xargs) && exit 1 || true
|
|
- name: Plugin Code
|
|
run: |
|
|
sudo bash ./utils/check-plugins-code.sh
|
|
|
|
ci-eclint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v2.3.5
|
|
|
|
- name: Setup Nodejs env
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '12'
|
|
|
|
- name: Install eclint
|
|
run: |
|
|
sudo npm install -g eclint
|
|
|
|
- name: Run eclint
|
|
run: |
|
|
eclint check
|