diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..d9724a2 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -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 diff --git a/README.md b/README.md index 22a03dd..492682d 100644 --- a/README.md +++ b/README.md @@ -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 Fernet symmetric encryption. Fernet is an opinionated way of using AES and HMAC authentication that makes diff --git a/package.json b/package.json index 58cbd88..ba52d36 100644 --- a/package.json +++ b/package.json @@ -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", @@ -27,4 +26,4 @@ "sinon": "*", "sinon-chai": "*" } -} \ No newline at end of file +}