Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 2aa6003

Browse files
author
Hendrik van Antwerpen
committed
Move NPM install test to publish workflow
The install test depends on a released version of the crate. The test in CI would fail for any PR that bumps the versions.
1 parent 55abf4d commit 2aa6003

File tree

2 files changed

+7
-28
lines changed

2 files changed

+7
-28
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,3 @@ jobs:
5454
run: cargo test --all-features
5555
- name: Run test suite with all optimizations
5656
run: cargo test --release
57-
58-
test-npm:
59-
runs-on: ${{ matrix.os }}
60-
strategy:
61-
matrix:
62-
node: [16.x]
63-
os: [ubuntu-latest]
64-
rust: [stable]
65-
66-
defaults:
67-
run:
68-
working-directory: tree-sitter-stack-graphs/npm
69-
70-
steps:
71-
- name: Install Node environment
72-
uses: actions/setup-node@v3
73-
with:
74-
node-version: ${{ matrix.node }}
75-
- name: Install Rust environment
76-
uses: hecrj/setup-rust-action@v1
77-
with:
78-
rust-version: ${{ matrix.rust }}
79-
- name: Checkout code
80-
uses: actions/checkout@v2
81-
- name: Build NPM package
82-
run: npm ci

.github/workflows/publish-tree-sitter-stack-graphs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,15 @@ jobs:
4141
- name: Checkout repository
4242
uses: actions/checkout@v3
4343
# TODO Verify the package version matches the tag
44+
- name: Install dependencies
45+
run: npm install
46+
working-directory: ${{ env.PACKAGE_DIR }}
4447
- name: Verify package
45-
run: npm publish --dry-run ${{ env.PACKAGE_DIR }}
48+
run: npm publish --dry-run
49+
working-directory: ${{ env.PACKAGE_DIR }}
4650
- name: Publish package
47-
run: npm publish ${{ env.PACKAGE_DIR }}
51+
run: npm publish
52+
working-directory: ${{ env.PACKAGE_DIR }}
4853
env:
4954
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5055
create-release:

0 commit comments

Comments
 (0)