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

Enable CI #1

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e9fd270
Enable CI
chriskilding Jun 6, 2022
fd0f3de
WIP add npm-publish GH Action boilerplate
chriskilding Jun 6, 2022
facdf16
WIP add test and publish CI workflows
chriskilding Jun 6, 2022
4c90ab6
Update test.yml
chriskilding Jun 6, 2022
8fe8ffa
Update test.yml
chriskilding Jun 6, 2022
ef1a02f
Update test.yml
chriskilding Jun 6, 2022
e736677
Update test.yml
chriskilding Jun 6, 2022
a885c05
Rework based on napi-rs skeleton project
chriskilding Jun 6, 2022
9e97463
Add Win/Mac/Linux build matrix to GH Action
chriskilding Jun 6, 2022
3e8d39f
Update test.yml
chriskilding Jun 6, 2022
d2849c1
Use target option in GH Actions
chriskilding Jun 6, 2022
1b6bbf0
Revert target config in GH Action
chriskilding Jun 6, 2022
0c6312c
Just do npm run build on Actions
chriskilding Jun 6, 2022
c026806
Tweak cert_format rust function
chriskilding Jun 6, 2022
c70ba3d
Remove semicolon
chriskilding Jun 6, 2022
3f09e07
Tweaks
chriskilding Jun 6, 2022
1ed5402
Update .gitignore
chriskilding Jun 7, 2022
ba1be02
ISC license
chriskilding Jun 7, 2022
d87a577
Test cert_format function
chriskilding Jun 7, 2022
b624ad4
Override Rust toolchain target for architecture
chriskilding Jun 8, 2022
c2c1dd5
Add Apple Silicon target to build matrix
chriskilding Jun 8, 2022
95f9257
Fix
chriskilding Jun 8, 2022
dee7a55
try node 18
chriskilding Jun 8, 2022
b30469c
Tweaks
chriskilding Jun 8, 2022
f8560aa
Node 16 again
chriskilding Jun 8, 2022
3712b0a
Toolchain not target
chriskilding Jun 8, 2022
9c80691
Back to stable toolchain
chriskilding Jun 8, 2022
ea21a84
Tweak test
chriskilding Jun 8, 2022
4e0687c
Tweak test
chriskilding Jun 8, 2022
44212f2
Again
chriskilding Jun 8, 2022
01a1aa6
Portable ls for windows
chriskilding Jun 8, 2022
bdfcd63
Remove ls -lah debug
chriskilding Jun 8, 2022
dbf8cf7
Use x64 host architecture for aarch64-apple
chriskilding Jun 8, 2022
84925f1
WIP add downstream collator job on GH Actions
chriskilding Jun 13, 2022
06c845a
Run npm artifacts target
chriskilding Jun 13, 2022
6bc575a
Try different host in test
chriskilding Jun 13, 2022
0eb3d91
Fix snake case warning from Rust
chriskilding Jun 13, 2022
fe8ad2b
Tweak npm run artifacts invocation
chriskilding Jun 13, 2022
5974d49
npm install in the publish job
chriskilding Jun 13, 2022
2779a6c
add --target option
chriskilding Jun 13, 2022
f65c43f
WIP must skip tests for aarch64-darwin
chriskilding Jun 13, 2022
061afed
Tweak
chriskilding Jun 13, 2022
327759f
Go back to CJS example in README
chriskilding Jun 13, 2022
7899f98
Put under @bnoordhuis NPM package scope
chriskilding Jun 15, 2022
a7929f5
dry run the npm publish
chriskilding Jun 15, 2022
76a829b
Set repository field in package.jsons
chriskilding Jun 15, 2022
de8fd2e
Remove ava framework
chriskilding Jul 18, 2022
5a3d9e1
Propagate RusTLS errors instead of hiding them
chriskilding Jul 18, 2022
4bedd5d
Rework the cert_format function up into JS
chriskilding Jul 19, 2022
a56b61e
Update README
chriskilding Jul 19, 2022
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
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
# TODO enable publish step
#- run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.npm_token}}

27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on: [push, pull_request, workflow_dispatch]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
# TODO re-enable other node versions once working node-version: [12.x, 14.x, 16.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"package": "native-certs",
"scripts": {
"build": "cargo build --release"
"build": "cargo build --release",
"test": "node test.js"
}
}