ci: merge lint/test/build into single job, add frontend tests
This commit is contained in:
parent
feaff2103e
commit
b9ace3ed5e
@ -9,46 +9,34 @@ env:
|
||||
NODE_VERSION: 20
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout repository'
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Setup dependencies'
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npx prettier --check "**/*.{ts,tsx}"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout repository'
|
||||
uses: actions/checkout@v4
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: 'Setup dependencies'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Format check
|
||||
run: npm run format:check
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run test:backend
|
||||
- name: Test backend
|
||||
run: npm run test:backend
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout repository'
|
||||
uses: actions/checkout@v4
|
||||
- name: Test frontend
|
||||
run: npm run test:frontend
|
||||
|
||||
- name: 'Setup dependencies'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Build backend
|
||||
run: npm run build:backend
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run build:backend
|
||||
- run: npm run build:frontend
|
||||
- name: Build frontend
|
||||
run: npm run build:frontend
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user