Skip to content
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

Migrate tests to Node's built-in test runner #953

Merged
merged 24 commits into from
Oct 17, 2024
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
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
env: {
"mocha": true,
"node": true
},
plugins: [
Expand Down
83 changes: 5 additions & 78 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
container: ['node:14.0.0']
node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0']
node_api_target: ['18.0.0']
include:
- container: 'node:16.0.0'
node_api_target: '20.0.0'
Expand All @@ -41,7 +41,7 @@ jobs:
fail-fast: false
matrix:
container: ['node:14.0.0']
node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0']
node_api_target: ['18.0.0']
include:
- container: 'node:16.0.0'
node_api_target: '20.0.0'
Expand All @@ -67,7 +67,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-2019, macos-12]
node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0', '20.0.0', '21.2.0']
node_api_target: ['18.0.0', '20.0.0', '21.2.0']
include:
- os: macos-12
python_version: '3.11'
Expand Down Expand Up @@ -131,22 +131,10 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
nodejs: ['14', '16', '17', '18', '20', '21']
exclude:
- os: 'macos-latest'
nodejs: '14'
nodejs: ['18', '20', '21']
include:
- os: 'macos-latest'
python_version: '3.11'
- os: 'macos-13'
nodejs: '14'
python_version: '3.10'
- os: 'windows-2019'
nodejs: '14'
- os: 'windows-2019'
nodejs: '16'
- os: 'windows-2019'
nodejs: '17'
- os: 'windows-2019'
nodejs: '18.20.1'
- os: 'windows-2019'
Expand Down Expand Up @@ -178,7 +166,7 @@ jobs:
fail-fast: false
matrix:
os: ['ARM64']
nodejs: ['14', '16', '17', '18', '20', '21']
nodejs: ['18', '20', '21']
container: node:${{ matrix.nodejs }}
steps:
- name: Checkout
Expand Down Expand Up @@ -213,67 +201,6 @@ jobs:
name: splunk-otel-js-metadata.yaml
path: splunk-otel-js-metadata.yaml

centos-build-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
nodejs: [14]
include:
- container: 'centos:7'
- cmd: 'curl -sL https://rpm.nodesource.com/setup_${NODE_VERSION}.x | bash - && yum install -y nodejs gcc-c++ make'
name: CentOS build check - ${{ matrix.container }} - Node.js ${{ matrix.nodejs }}
container: ${{ matrix.container }}
env:
NODE_VERSION: ${{ matrix.nodejs }}
steps:
- name: Setup container
run: |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://archive.kernel.org/centos-vault|g' /etc/yum.repos.d/CentOS-*
yum update -y
${{ matrix.cmd }}
- name: Checkout
uses: actions/checkout@v3
- name: Install npm dependencies
run: npm ci --ignore-scripts --no-optional
- name: Compile native
run: npm run prebuild:current
- name: Run tests
run: npm run test

centos-prebuild-check:
needs: [prebuilds-linux]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container: ['centos:7']
nodejs: [14, 16]
name: Centos check - ${{ matrix.container }} - Node.js ${{ matrix.nodejs }}
container: ${{ matrix.container }}
env:
NODE_VERSION: ${{ matrix.nodejs }}
steps:
- name: Setup container
run: |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://archive.kernel.org/centos-vault|g' /etc/yum.repos.d/CentOS-*
yum update -y
curl -sL https://rpm.nodesource.com/setup_${NODE_VERSION}.x | bash - && yum install -y nodejs gcc-c++ make
- name: Checkout
uses: actions/checkout@v3
- name: Download
uses: actions/download-artifact@v3
- name: copy prebuilds
run: |
mkdir -p prebuilds
cp -r prebuilds-linux/* prebuilds
- name: Install npm dependencies
run: npm ci --ignore-scripts --no-optional --loglevel verbose
- name: Run tests
run: npm run test

e2e-local:
runs-on: ubuntu-latest
strategy:
Expand Down
Loading
Loading