Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.travis.yml
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules
test/*.pem
test/keys
test/*.txt
test/*.txt
dist
coverage
docs
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Makefile
test/
.travis.yml
jest/
scripts/
.dockerignore
tsconfig.*
package-lock.json
docs
coverage
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

49 changes: 37 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
language: node_js
node_js:
- 0.10
- 0.11
- 0.12
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11

notifications:
email:
recipients:
- brianloveswords@gmail.com


install:
- npm ci

jobs:
include:
- stage: "Test"
name: "Node 8"
node_js: "8"
script: npm t

- name: "Node 10"
node_js: "10"
script: npm t

- name: "Node 11"
node_js: "11"
script: npm t

- name: "Node 12"
node_js: "12"
script:
- npm t

- stage: "Deploy Docs to GH Pages"
node_js: "10" # Current LTS
script: npm run docs
deploy:
local_dir: ./docs
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
on:
branch: master
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:10-stretch as base
WORKDIR /app
COPY . .
RUN npm ci

# Make keys with: docker build --target genkeys -t node-jwa:keys .
FROM node:10-stretch as genkeys
WORKDIR /app
COPY --from=base /app .
RUN apt-get update
RUN apt-get install openssl
RUN ["mkdir", "-p", "test/fixtures"]
ENTRYPOINT ["npm", "run", "test:keys:gen"]

# Run tests with: docker build --target test -t node-jwa:test .
FROM node:10-stretch as test
WORKDIR /app
COPY --from=base /app .
ENTRYPOINT [ "npm", "t" ]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ clean:
@rm test/*.pem
@rm test/keys

.PHONY: test
.PHONY: test clean verbose
252 changes: 0 additions & 252 deletions index.js

This file was deleted.

21 changes: 21 additions & 0 deletions jest/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @type {jest.ProjectConfig}
*/
module.exports = {
transform: {
'^.+\\.tsx?$': 'ts-jest'
},
roots: [
'<rootDir>/../test/unit',
'<rootDir>/../test/integration'
],
testRegex: '(.*|(\\.|/)(test|spec))\\.ts$',
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'node'
],
};
Loading