Skip to content

Commit

Permalink
Update CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Aug 14, 2022
1 parent 5722302 commit 5f2f4ff
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint

on:
push:
branches:
- master
pull_request:
branches:
- '**'

jobs:
lint:
name: Lint on Node.js LTS

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 'lts/*'

- run: npm ci

- name: Lint and Test
run: npm run lint
15 changes: 6 additions & 9 deletions .github/workflows/nodejs.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Test

on:
push:
Expand All @@ -10,26 +10,23 @@ on:

jobs:
test:
name: Lint and test on Node.js ${{ matrix.node }}
name: Test on Node.js ${{ matrix.node }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node: [12, 14, 16]
node: [12, 14, 16, 18]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install latest npm
run: npm install --global npm@latest

- run: npm ci

- name: Lint and Test
- name: Test
run: npm test
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
"stylelint": "^14.0.0"
},
"scripts": {
"pretest": "eslint . --max-warnings=0 && prettier '**/*.js' --check",
"lint": "eslint . --max-warnings=0 && prettier '**/*.js' --check",
"test": "jest",
"jest": "jest",
"watch": "jest --watch",
"coverage": "jest --coverage",
"fix": "eslint . --fix --max-warnings=0 && prettier '**/*.js' --write",
Expand Down

0 comments on commit 5f2f4ff

Please sign in to comment.