Skip to content

Commit

Permalink
ci: extract workflows from build job to new lint and test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
cfisher-scottlogic committed Apr 4, 2024
1 parent 87d2372 commit 4d98231
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: latest
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: latest

- name: Build
run: |
npm ci
npm run commitlint
npm run lint
npm run bundle
npm run bundle-min
npm test
- name: Install dependencies
run: npm ci

- name: Build
run: |
npm run bundle
npm run bundle-min
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: latest

- name: Install dependencies
run: npm ci

- name: commitlint
run: npm run commitlint

- name: lint
run: npm run lint
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: latest

- name: Install dependencies
run: npm ci

- name: Test
run: npm test

0 comments on commit 4d98231

Please sign in to comment.