Skip to content

Commit

Permalink
Bump up test tool and testcontainers to fix tests (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
kezhenxu94 committed Nov 29, 2023
1 parent 4f9a91d commit d0b4ed1
Show file tree
Hide file tree
Showing 7 changed files with 495 additions and 95 deletions.
51 changes: 40 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,49 @@ on:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set Up NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Lint
run: |
npm i
npm run lint
build-matrix:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
plugins: ${{ steps.plugins.outputs.plugins }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- id: plugins
run: echo "plugins=$(ls tests/plugins | grep -v common | jq --raw-input | jq --slurp --compact-output)" >> "$GITHUB_OUTPUT"

TestPlugins:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [ build-matrix ]
strategy:
matrix:
node-version: [ 10, 12, 14, 16, 18 ]
node-version: [ 14, 16, 18, 20 ]
plugin: ${{ fromJson(needs.build-matrix.outputs.plugins) }}
env:
SW_NODE_VERSION: ${{ matrix.node-version }}
steps:
Expand All @@ -49,18 +86,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Test On Node@12 And Above(Current:Node@${{matrix.node-version}})
if: matrix.node-version >= 12
run: |
npm i
npm run lint
npm run test
- name: Test On Node@10
if: matrix.node-version == 10
- name: Test On Node@${{ matrix.node-version }}
run: |
npm i
npm run test
npm run test tests/plugins/${{ matrix.plugin }}/
TestLib:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ $ npm install --save skywalking-backend-js

## Set up NodeJS Agent

SkyWalking NodeJS SDK requires SkyWalking backend (OAP) 8.0+ and NodeJS >= 10.
SkyWalking NodeJS SDK requires SkyWalking backend (OAP) 8.0+ and NodeJS >= 14,
other versions are not tested and SkyWalking NodeJS SDK may or may not work,
please make sure to use the supported versions before reporting any issue.

```typescript
import agent from 'skywalking-backend-js';
Expand Down

0 comments on commit d0b4ed1

Please sign in to comment.