-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from vansergen/dependencies
Dependencies
- Loading branch information
Showing
35 changed files
with
9,307 additions
and
6,654 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "extends": "b2broker" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Typescript compiled files | ||
build/ | ||
|
||
# Documentation | ||
docs/ | ||
|
||
# nyc test coverage | ||
.nyc_output/ | ||
|
||
# Coverage directory used by nyc | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": ["*.js"], | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.d.ts"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["./build/index.js"], | ||
"rules": { | ||
"no-prototype-builtins": "off" | ||
} | ||
} | ||
], | ||
"env": { | ||
"node": true, | ||
"es2020": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"curly": "error", | ||
"eqeqeq": "error", | ||
"linebreak-style": "error", | ||
"no-console": "error", | ||
"quotes": "error", | ||
"prefer-destructuring": "error", | ||
"semi": "error", | ||
"@typescript-eslint/camelcase": "off" | ||
} | ||
} | ||
{ "extends": ["b2broker-ts"], "parserOptions": { "project": "tsconfig.json" } } |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Delete the private key | ||
rm -f .github/pgp/key.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Descrypt the private key | ||
gpg --quiet --batch --yes --decrypt --passphrase=${PRIVATE_KEY_PASSPHRASE} \ | ||
--output ./.github/pgp/key.asc ./.github/pgp/key.asc.gpg | ||
|
||
# Set the access permissions | ||
chmod 600 ./.github/pgp/key.asc | ||
|
||
# Import the private key | ||
gpg --batch --yes --import ./.github/pgp/key.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Encrypt PGP key | ||
gpg --batch --symmetric --cipher-algo AES256 \ | ||
--output ./.github/pgp/key.asc.gpg --passphrase=${PRIVATE_KEY_PASSPHRASE} \ | ||
./.github/pgp/key.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Set pgp siging key | ||
git config user.signingkey ${PGP_KEY_ID} | ||
|
||
# Set the custom gpg program (that passes the passphrase to `gpg`) | ||
git config gpg.program ./.github/scripts/gpg.sh | ||
|
||
# Sign commits with PGP key | ||
git config commit.gpgsign true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Pass the passphrase to gpg | ||
gpg --batch --pinentry-mode=loopback --passphrase ${PGP_PASSPHRASE} -v $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14, 15] | ||
|
||
container: node:${{ matrix.node-version }}-buster | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Node.js version | ||
run: node --version | ||
|
||
- name: npm version | ||
run: npm --version | ||
|
||
- name: Git version | ||
run: git --version | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Tests | ||
run: npm test | ||
|
||
- name: Tests:js | ||
run: npm run test:js | ||
|
||
- name: Prettier | ||
run: npm run prettier | ||
|
||
- name: commitlint | ||
run: npm run commitlint:all | ||
|
||
- name: ESLint | ||
run: npm run lint | ||
|
||
- name: Publish test | ||
run: npm run publish:test | ||
|
||
- name: Docs | ||
run: | | ||
rm -rf docs | ||
npm run docs:test | ||
- name: npm vulnerabilities | ||
run: npm audit --production | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
|
||
container: node:14 | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Node.js version | ||
run: node --version | ||
|
||
- name: npm version | ||
run: npm --version | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Coverage | ||
run: npm run coverage | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release: | ||
needs: [test, coverage] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: node:14-buster | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Node.js version | ||
run: node --version | ||
|
||
- name: npm version | ||
run: npm --version | ||
|
||
- name: git version | ||
run: git --version | ||
|
||
- name: gpg version | ||
run: gpg --version | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Decrypt PGP key | ||
run: ./.github/scripts/decrypt.sh | ||
|
||
- name: Setup git | ||
run: ./.github/scripts/git.sh | ||
|
||
- name: Release | ||
run: npm run release | ||
|
||
- name: Cleanup | ||
run: ./.github/scripts/cleanup.sh | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | ||
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | ||
NPM_CONFIG_UNSAFE_PERM: true | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }} | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PRIVATE_KEY_PASSPHRASE: ${{ secrets.PRIVATE_KEY_PASSPHRASE }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.