Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
* add `workflow_dispatch`
* specify `FORCE_COLOR: 2` for colored output
* update `actions/checkout` to v2
* update `actions/setup-node` to v2
* add Node.js 16
* reduce CI matrix
  • Loading branch information
XhmikosR committed Jan 28, 2022
1 parent 4804aba commit 81d010b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
name: Lint
on: [push, pull_request]

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:

env:
CI: true
FORCE_COLOR: 2

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "12"
node-version: "16"

- name: Install npm dependencies
run: npm install
Expand Down
37 changes: 27 additions & 10 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
name: Node CI
on: [push, pull_request]

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:

env:
CI: true
FORCE_COLOR: 2

jobs:
build:
name: v${{ matrix.node-version }} @ ${{ matrix.os }}
test:
name: Node.js ${{ matrix.node }} @ ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [8, 10, 12, 14]
os: [ubuntu-latest, windows-latest, macOS-latest]
node: [8, 10, 12, 14, 16]
os: [ubuntu-latest]
include:
- os: windows-latest
node: 8
- os: windows-latest
node: 14
- os: macOS-latest
node: 8
- os: macOS-latest
node: 14

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
- run: npm install
- name: Run mocha tests
run: npm run mocha

0 comments on commit 81d010b

Please sign in to comment.