-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Nikita Tchayka <[email protected]> Co-authored-by: Javier Toledo <[email protected]>
- Loading branch information
Showing
203 changed files
with
17,436 additions
and
0 deletions.
There are no files selected for viewing
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,48 @@ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
es6: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. | ||
], | ||
globals: { | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly', | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
project: './tsconfig.json', | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: true }], | ||
indent: ['error', 2, { SwitchCase: 1 }], | ||
'linebreak-style': ['error', 'unix'], | ||
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }], | ||
semi: ['error', 'never'], | ||
'@typescript-eslint/generic-type-naming': ['error', '^T[A-Z][a-zA-Z]+$'], | ||
'no-extra-parens': 'off', | ||
'@typescript-eslint/no-extra-parens': ['error'], | ||
'no-magic-numbers': 'off', | ||
'@typescript-eslint/no-parameter-properties': 0, | ||
'@typescript-eslint/no-floating-promises': ['error'], | ||
'@typescript-eslint/array-type': [0, 'generic'], | ||
'@typescript-eslint/no-use-before-define': 0, | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'warn', | ||
{ | ||
allowExpressions: true, | ||
allowTypedFunctionExpressions: true, | ||
allowHigherOrderFunctions: 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,43 @@ | ||
name: Lint | ||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
|
||
strategy: | ||
matrix: | ||
runs-on: [ubuntu-latest] | ||
fail-fast: false | ||
|
||
runs-on: ${{ matrix.runs-on }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set Node.js 12.x | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Bootstrap the project | ||
run: npx lerna bootstrap | ||
|
||
- name: Lint | ||
run: npx lerna run lint |
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,51 @@ | ||
name: Publish | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
publish-npm: | ||
if: "!contains(github.event.head_commit.author.name, 'GITHUBACTION')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2-beta | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN_ACTION }} | ||
|
||
# Workaround for https://github.com/actions/checkout/issues/6#issuecomment-520636057 | ||
- name: Prepare repository | ||
run: git checkout "${GITHUB_REF:11}" | ||
|
||
- name: Configure Git | ||
run: | | ||
git remote rm origin | ||
git remote add origin "https://$USER_NAME:[email protected]/boostercloud/booster.git" | ||
git fetch | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GITHUBACTION" | ||
env: | ||
USER_NAME: ${{ secrets.DEPLOYING_USER_NAME }} | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN_ACTION }} # Token for pushing | ||
|
||
- uses: actions/setup-node@master | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- run: npx lerna bootstrap | ||
|
||
# Discard all changes that might have occurred after bootstrap | ||
- run: git stash | ||
|
||
- name: Authenticate with Registry | ||
run: npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- uses: theam/actions/lerna-semantic-publish@master | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN_ACTION }} |
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,46 @@ | ||
name: Tests | ||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
|
||
strategy: | ||
matrix: | ||
runs-on: [ubuntu-latest, macOS-latest, windows-latest] | ||
fail-fast: false | ||
|
||
runs-on: ${{ matrix.runs-on }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set Node.js 12.x | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Bootstrap the project | ||
run: npx lerna bootstrap | ||
|
||
- name: Compile | ||
run: npx lerna run compile | ||
|
||
- name: Tests | ||
run: npx lerna run test |
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 @@ | ||
*-debug.log | ||
*-error.log | ||
.nyc_output | ||
dist/ | ||
lib/ | ||
package-lock.json | ||
tmp/ | ||
node_modules | ||
*.tsbuildinfo | ||
.idea | ||
coverage | ||
.DS_Store |
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,9 @@ | ||
tabWidth: 2 | ||
useTabs: false | ||
semi: false | ||
singleQuote: true | ||
quoteProps: 'as-needed' | ||
trailingComma: 'es5' | ||
bracketSpacing: true | ||
arrowParens: always | ||
printWidth: 120 |
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,98 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "all booster tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
"args": [ | ||
"-r", | ||
"ts-node/register", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"--forbid-only", | ||
"${workspaceFolder}/packages/*/test/**/*.test.ts" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"protocol": "inspector" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "framework-provider-aws tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
"args": [ | ||
"-r", | ||
"ts-node/register", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"--forbid-only", | ||
"${workspaceFolder}/packages/framework-provider-aws/test/**/*.test.ts" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"protocol": "inspector" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "cli tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
"args": [ | ||
"-r", | ||
"ts-node/register", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"--forbid-only", | ||
"${workspaceFolder}/packages/cli/test/**/*.test.ts" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"protocol": "inspector" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "framework-core tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
"args": [ | ||
"-r", | ||
"ts-node/register", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"--forbid-only", | ||
"${workspaceFolder}/packages/framework-core/test/**/*.test.ts" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"protocol": "inspector" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "framework-types tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
"args": [ | ||
"-r", | ||
"ts-node/register", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"--forbid-only", | ||
"${workspaceFolder}/packages/framework-types/test/**/*.test.ts" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"protocol": "inspector" | ||
} | ||
] | ||
} |
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,22 @@ | ||
{ | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
], | ||
"mocha.options": { | ||
"compilers": "ts-node/register", | ||
"watchExtensions": "ts", | ||
"recursive": true, | ||
"reporter": "spec", | ||
"timeout": 5000 | ||
}, | ||
"mocha.requires": [ | ||
"ts-node/register" | ||
], | ||
"mocha.files.glob": "packages/*/test/**/*.ts", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
} |
Oops, something went wrong.