ci: add backend lint+build workflow for center and guild
This commit is contained in:
46
.github/workflows/backend-ci.yml
vendored
Normal file
46
.github/workflows/backend-ci.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: backend-ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- "Fabric.Backend.Center/**"
|
||||||
|
- "Fabric.Backend.Guild/**"
|
||||||
|
- ".github/workflows/backend-ci.yml"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "Fabric.Backend.Center/**"
|
||||||
|
- "Fabric.Backend.Guild/**"
|
||||||
|
- ".github/workflows/backend-ci.yml"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
verify:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
service:
|
||||||
|
- Fabric.Backend.Center
|
||||||
|
- Fabric.Backend.Guild
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ matrix.service }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: ${{ matrix.service }}/package-lock.json
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
- [x] docker-compose(center/guild + mysql)
|
- [x] docker-compose(center/guild + mysql)
|
||||||
- [x] 增加 `.env.example`(Center/Guild)
|
- [x] 增加 `.env.example`(Center/Guild)
|
||||||
- [x] 增加统一 lint/format 配置(eslint + prettier)
|
- [x] 增加统一 lint/format 配置(eslint + prettier)
|
||||||
- [ ] 增加基础 CI(build + lint)
|
- [x] 增加基础 CI(build + lint)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user