Skip to content

Commit a917965

Browse files
authored
ci: update the ci config (less#3789)
* ci: update the ci config Change the Node.js version in the matrix tests from v16 to the latest LTS version, v18, and add tests for Node.js v19. * chore: remove npm cache * chore: change github config
1 parent 2702322 commit a917965

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ merge of your pull request!
1818

1919
**Why**:
2020

21-
<!-- How were these changes implemented? -->
22-
23-
**How**:
24-
2521
<!-- Have you done all of these things? -->
2622

2723
**Checklist**:

.github/workflows/ci.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
name: Nodejs Test
33

44
# Triggers the workflow on push or pull request events
5-
on: [push, pull_request]
5+
on:
6+
push:
7+
branches: [main, master]
8+
pull_request:
9+
branches: [main, master]
610

711
jobs:
812
platform_spec_test:
@@ -11,7 +15,7 @@ jobs:
1115
matrix:
1216
# Test all mainstream operating system
1317
os: [ubuntu-latest, macos-latest, windows-latest]
14-
node: [16]
18+
node: [18]
1519
runs-on: ${{ matrix.os }}
1620
steps:
1721
# Pull repo to test machine
@@ -21,18 +25,6 @@ jobs:
2125
with:
2226
# The Node.js version to configure
2327
node-version: ${{ matrix.node }}
24-
# Caching dependencies to speed up workflows
25-
- name: Get npm cache directory
26-
id: npm-cache-dir
27-
run: |
28-
echo "::set-output name=dir::$(npm config get cache)"
29-
- uses: actions/cache@v2
30-
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
31-
with:
32-
path: ${{ steps.npm-cache-dir.outputs.dir }}
33-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
34-
restore-keys: |
35-
${{ runner.os }}-node-
3628
- name: Install npm dependencies
3729
run: npm install
3830
- name: Print put node & npm version
@@ -46,7 +38,7 @@ jobs:
4638
strategy:
4739
matrix:
4840
os: [ubuntu-latest]
49-
node: [10, 12, 14, 18]
41+
node: [10, 12, 14, 16, 19]
5042
runs-on: ${{ matrix.os }}
5143
steps:
5244
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)