Skip to content

Commit

Permalink
ci: download pack after checkout + enable node 10
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 26, 2024
1 parent 1257c49 commit 9b8f85f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,15 @@ jobs:
os:
- ubuntu-24.04
- windows-2022
- macos-14
- macos-13
node-version:
# - 10
- 10
- 22
steps:
- name: Download Pack
uses: actions/download-artifact@v4
with:
name: pack

include:
- os: macos-14
node-version: 22
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -276,5 +274,10 @@ jobs:

- uses: actions/checkout@v4

- name: Download Pack
uses: actions/download-artifact@v4
with:
name: pack

- name: Smoke Test
run: bash ./script/smoke-test.bash
6 changes: 3 additions & 3 deletions script/smoke-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Pack zeromq.js if needed"
version=$(node -e 'console.log(require("./package.json").version)')
pack_name="zeromq-${version}.tgz"
echo "${pack_name}"
test -f "${pack_name}" || ls -R
test -f "${pack_name}" || npm pack

init_smoke_test() {
local pm=$1
Expand All @@ -15,8 +15,8 @@ init_smoke_test() {
rm -rf "./smoke-test-${pm}"
mkdir "./smoke-test-${pm}"
cd "./smoke-test-${pm}"
npm init -q --init-module "smoke-test-${pm}" -y
npm pkg set dependencies.zeromq="file:../${pack_name}" || (jq '.dependencies.zeromq = "file:../${pack_name}"' package.json >temp.json && mv temp.json package.json)
npm init -y
npm pkg set dependencies.zeromq="file:../${pack_name}" || (jq ".dependencies.zeromq = \"file:../${pack_name}\"" package.json >temp.json && mv temp.json package.json)
}

package_managers=(npm pnpm yarn)
Expand Down

0 comments on commit 9b8f85f

Please sign in to comment.