Skip to content

Commit

Permalink
refactor: split node action into different steps
Browse files Browse the repository at this point in the history
  • Loading branch information
dornelasnelson committed Jan 10, 2024
1 parent 9402007 commit b3781ff
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
42 changes: 23 additions & 19 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@ name: Build-And-Test
on: [push]

jobs:
build:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]

strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v4

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, lint and test
run: |
npm ci
npm run build --if-present
npm run lint
npm test
env:
CI: true
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4

- name: Install dependencies
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
run: npm ci
- name: Run build
run: npm run build --if-present
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test
env:
CI: true
3 changes: 1 addition & 2 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: "size"
on:
pull_request:
branches:
- master
- next
- '*'

jobs:
size:
Expand Down

0 comments on commit b3781ff

Please sign in to comment.