chore: add zh #192
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
jobs: | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
environment: Staging | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
DATABASE_AUTH_TOKEN: ${{ secrets.DATABASE_AUTH_TOKEN }} | |
SECRET: ${{ secrets.SECRET }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Clean Install | |
run: npm ci | |
- name: Format | |
run: npm run format | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
environment: Staging | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
DATABASE_AUTH_TOKEN: ${{ secrets.DATABASE_AUTH_TOKEN }} | |
SECRET: ${{ secrets.SECRET }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Clean Install | |
run: npm ci && npm run build && npm run format | |
- name: Lint | |
run: npm run lint | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
environment: Staging | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
DATABASE_AUTH_TOKEN: ${{ secrets.DATABASE_AUTH_TOKEN }} | |
SECRET: ${{ secrets.SECRET }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Clean Install | |
run: npm ci && npm run build | |
- name: Check | |
run: npm run check |