Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add node version matrix #179

Merged
merged 6 commits into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 43 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Continuous Integration'
name: CI

on:
push:
Expand All @@ -8,26 +8,53 @@ on:

jobs:
test:
runs-on: ubuntu-latest
name: 'Testing'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [12, 14, 16, 17]
MohdImran001 marked this conversation as resolved.
Show resolved Hide resolved
include:
- os: macos-latest
node_version: 16
MohdImran001 marked this conversation as resolved.
Show resolved Hide resolved
- os: windows-latest
node_version: 16
fail-fast: false

name: 'Build & Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v2

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: ${{ matrix.node_version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run test

- name: Install deps
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm run test

lint:
runs-on: ubuntu-latest
name: 'Linting'
name: 'Lint: node-16, ubuntu-latest'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v2

- name: Set node version to 16
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run lint

- name: Install deps
run: npm ci

- name: Lint
run: npm run lint
Loading