Skip to content

Commit

Permalink
chore: add lint into github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hardyscc committed Jun 17, 2020
1 parent 2937ecf commit ecde64f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,33 @@ name: Node.js CI

on:
push:
branches: [ master ]
branches: [master]
paths-ignore:
- 'README.md'
pull_request:
branches: [ master ]
branches: [master]
paths-ignore:
- 'README.md'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 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 }}
- run: npm ci
- run: npm run build service-user
- run: npm run build service-account
- run: npm run build gateway
- run: npm test -- --passWithNoTests
env:
CI: true
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run build service-user
- run: npm run build service-account
- run: npm run build gateway
- run: npm test -- --passWithNoTests
env:
CI: true
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"format": "prettier --write \"apps/**/*.ts\" \"libs/**/*.ts\"",
"format": "prettier --write \"{apps,libs}/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint '{src,apps,libs,test}/**/*.ts' --fix",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --max-warnings 0",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
Expand Down

0 comments on commit ecde64f

Please sign in to comment.