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

smoke test #634

Closed
wants to merge 1 commit into from
Closed
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
51 changes: 51 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ jobs:
pnpm install -g electron@latest
xvfb-run --auto-servernum pnpm run test.electron.main
continue-on-error: true

merge-build:
runs-on: ubuntu-latest
needs: Build
Expand All @@ -199,3 +200,53 @@ jobs:
name: build
pattern: build-*
delete-merged: true


smoke-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
pm:
- npm
- yarn
- pnpm
steps:
- uses: actions/setup-node@v4
Copy link
Member

Choose a reason for hiding this comment

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

This can include multiple versions such as 10, 12, 18, 22 to ensure compatibility across different versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're absolutely right and I'd like to get there before this is merged. As you can see from my embarrassing commit history, I'm not quite there yet...

- run: |
npm init --init-module testproject -y
Copy link
Member

@aminya aminya Jun 20, 2024

Choose a reason for hiding this comment

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

You can use this template package and add an example test to it
https://github.com/zeromq/zeromq.js/tree/master/test/typings-compatibility/template

npm pkg set dependencies.zeromq='${{ github.repositoryUrl }}#${{ github.ref }}'

- if: ${{ matrix.pm == 'npm' }}
run: |
npm install
env:
NPM_CONFIG_LOGLEVEL: verbose

Copy link
Member

Choose a reason for hiding this comment

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

It would be great to run a simple example where zeromq is imported. This will ensure the runtime compatibility via the smoke test for different Nodejs versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

- if: ${{ matrix.pm == 'pnpm' }}
run: |
npm install -g pnpm
pnpm install
env:
NPM_CONFIG_LOGLEVEL: verbose

- if: ${{ matrix.pm == 'yarn' }}
run: |
npm install -g yarn
yarn set version stable
yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
YARN_ENABLE_INLINE_BUILDS: true
- uses: actions/upload-artifact@v4
if: ${{ failure() && runner.os == 'Windows' }}
with:
name: logs-${{matrix.pm}}-${{runner.os}}
overwrite: true
path: |
C:\npm\cache\_logs\

Loading