mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 19:34:34 +00:00
chore(workflow): add lint step
This commit is contained in:
46
.github/workflows/build.yml
vendored
46
.github/workflows/build.yml
vendored
@@ -5,6 +5,25 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
- name: Check Api Code Style
|
||||
run: npm run lint-api
|
||||
- name: Check Web Code Style
|
||||
run: npm run lint-web
|
||||
build-api:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -32,3 +51,30 @@ jobs:
|
||||
run: npm run build
|
||||
env:
|
||||
CI: true
|
||||
build-web:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Dependencies
|
||||
working-directory: ./web
|
||||
run: npm ci
|
||||
- name: Check Code Style
|
||||
working-directory: ./web
|
||||
run: npm run lint
|
||||
- name: Run Unit Tests
|
||||
working-directory: ./web
|
||||
run: npm test
|
||||
- name: Build Package
|
||||
working-directory: ./web
|
||||
run: npm run build
|
||||
env:
|
||||
CI: true
|
||||
|
||||
Reference in New Issue
Block a user