Skip to content

ci: update the ci config #3789

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

Merged
merged 3 commits into from
Apr 4, 2023
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
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? -->
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this


**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:
Copy link
Member Author

@iChenLei iChenLei Apr 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduce redundant ci trigger

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the npm cache logic ( it's not very useful

- 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