Skip to content

Commit

Permalink
Add CI Github Action (#31)
Browse files Browse the repository at this point in the history
* Add CI Action
* Don't attempt to open browser when tests complete.
* Add CI badge to README.
  • Loading branch information
kennyp authored Feb 7, 2024
1 parent e272ac6 commit 0a1636c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn install --frozen-lockfile
- run: yarn test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Fernet.js

![ci status](https://github.com/csquared/fernet.js/actions/workflows/node.js.yml/badge.svg?branch=master)

Javascript implementation of <a href="https://github.com/kr/fernet-spec">Fernet symmetric encryption</a>.

Fernet is an opinionated way of using AES and HMAC authentication that makes
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"main": "fernet.js",
"scripts": {
"pretest": "browserify -s fernet fernet.js > fernetBrowser.js",
"test": "mocha",
"posttest": "open test.html"
"test": "mocha"
},
"keywords": [
"encryption",
Expand All @@ -27,4 +26,4 @@
"sinon": "*",
"sinon-chai": "*"
}
}
}

0 comments on commit 0a1636c

Please sign in to comment.