Skip to content

Commit

Permalink
ci: update the ci config (#3789)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
iChenLei authored Apr 4, 2023
1 parent 2702322 commit a917965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
4 changes: 0 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ merge of your pull request!

**Why**:

<!-- How were these changes implemented? -->

**How**:

<!-- Have you done all of these things? -->

**Checklist**:
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
name: Nodejs Test

# Triggers the workflow on push or pull request events
on: [push, pull_request]
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
platform_spec_test:
Expand All @@ -11,7 +15,7 @@ jobs:
matrix:
# Test all mainstream operating system
os: [ubuntu-latest, macos-latest, windows-latest]
node: [16]
node: [18]
runs-on: ${{ matrix.os }}
steps:
# Pull repo to test machine
Expand All @@ -21,18 +25,6 @@ jobs:
with:
# The Node.js version to configure
node-version: ${{ matrix.node }}
# Caching dependencies to speed up workflows
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
Expand All @@ -46,7 +38,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [10, 12, 14, 18]
node: [10, 12, 14, 16, 19]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit a917965

Please sign in to comment.