Skip to content

Commit

Permalink
add a post-publish package test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Mar 14, 2023
1 parent 4e56e1f commit ccc71fc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test npm package

on:
workflow_dispatch:
inputs:
version:
description: 'Package version to test'
required: true

jobs:
integration:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run build
- name: Run headless test
uses: GabrielBB/xvfb-action@v1
env:
SQLITE_INSTALL_CMD: npm install sqlite-wasm-http@${{ github.event.inputs.version }}
with:
run: npm test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"publish": "npm run publish:shared && npm run publish:gh",
"preversion": "npm test",
"version": "npm run build && npm run doc && git add package.json docs",
"postversion": "git push && git push --tags && npm run publish"
"postversion": "git push && git push --tags && npm run publish",
"postpublish": "gh workflow run npm.yml -F version=$npm_package_version"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit ccc71fc

Please sign in to comment.