Skip to content

Commit

Permalink
Release 0.1.0
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Tchayka <[email protected]>
Co-authored-by: Javier Toledo <[email protected]>
  • Loading branch information
3 people committed Jan 24, 2020
0 parents commit 7956dbe
Show file tree
Hide file tree
Showing 203 changed files with 17,436 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .eslintrc.js
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,
},
],
},
}
43 changes: 43 additions & 0 deletions .github/workflows/lint.yml
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
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
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 }}
46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
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
12 changes: 12 additions & 0 deletions .gitignore
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
9 changes: 9 additions & 0 deletions .prettierrc.yaml
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
98 changes: 98 additions & 0 deletions .vscode/launch.json
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"
}
]
}
22 changes: 22 additions & 0 deletions .vscode/settings.json
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
}
}
Loading

0 comments on commit 7956dbe

Please sign in to comment.