aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMohd Imran <[email protected]>2022-01-19 03:35:39 +0530
committerGitHub <[email protected]>2022-01-18 23:05:39 +0100
commit80e8b3d4aec2e8944f7488a86f6b1ad4d2b2445d (patch)
treed546fa0b0d7bea015fa2fa68af1182590b75cd3b /.github/workflows
parentd72482b0a19c3e98b6c8ea96d6c8407711af60cc (diff)
downloadfaker-80e8b3d4aec2e8944f7488a86f6b1ad4d2b2445d.tar.xz
faker-80e8b3d4aec2e8944f7488a86f6b1ad4d2b2445d.zip
ci: add node version matrix (#179)
Co-authored-by: Shinigami92 <[email protected]>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml59
1 files changed, 43 insertions, 16 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8919b79f..1734cb50 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@
-name: 'Continuous Integration'
+name: CI
on:
push:
@@ -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]
+ include:
+ - os: macos-latest
+ node_version: 16
+ - 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