mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-27 02:27:12 +00:00
66 lines
1.2 KiB
YAML
66 lines
1.2 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- '**.js'
|
|
- '**.mjs'
|
|
- '**.cjs'
|
|
- '**.jsx'
|
|
- '**.ts'
|
|
- '**.mts'
|
|
- '**.cts'
|
|
- '**.tsx'
|
|
- '**.vue'
|
|
- '**.json'
|
|
pull_request:
|
|
paths:
|
|
- '**.js'
|
|
- '**.mjs'
|
|
- '**.cjs'
|
|
- '**.jsx'
|
|
- '**.ts'
|
|
- '**.mts'
|
|
- '**.cts'
|
|
- '**.tsx'
|
|
- '**.vue'
|
|
- '**.json'
|
|
|
|
concurrency:
|
|
group: lint-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: 'bash'
|
|
|
|
jobs:
|
|
eslint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16 # Need for npm >=7.7
|
|
cache: 'npm'
|
|
|
|
- run: npm ci
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
|
|
- run: npm run lint --if-present
|
|
|
|
# This job just check code style for in-template contributions.
|
|
code-style:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16 # Need for npm >=7.7
|
|
cache: 'npm'
|
|
|
|
- run: npm i prettier
|
|
- run: npx prettier --check "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,json}"
|