-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notification Infrastructure seed release (#73)
- Loading branch information
Showing
718 changed files
with
57,647 additions
and
7,170 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,11 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 |
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 @@ | ||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
|
||
# OSX | ||
.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,64 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'airbnb-typescript', | ||
'plugin:import/typescript', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', | ||
'plugin:promise/recommended', | ||
], | ||
ignorePatterns: ['.eslintrc.js'], | ||
plugins: ['import', 'promise', '@typescript-eslint', 'prettier'], | ||
parser: '@typescript-eslint/parser', | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
}, | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'@typescript-eslint/lines-between-class-members': 'off', | ||
'react/jsx-wrap-multilines': 'off', | ||
'promise/catch-or-return': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-unused-expressions': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'react/jsx-closing-bracket-location': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': ['off'], | ||
'mocha/no-mocha-arrows': 'off', | ||
'no-return-await': 'off', | ||
'no-await-in-loop': 'off', | ||
'no-continue': 'off', | ||
'no-prototype-builtins': 'off', | ||
'import/no-cycle': 'off', | ||
'class-methods-use-this': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/no-explicit-any': 1, | ||
'no-restricted-syntax': 'off', | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'no-underscore-dangle': 'off', | ||
'import/prefer-default-export': 'off', | ||
// A temporary hack related to IDE not resolving correct package.json | ||
'import/no-extraneous-dependencies': 'off', | ||
'react/jsx-one-expression-per-line': 'off', | ||
'react/jsx-no-bind': 'off', | ||
'lines-between-class-members': 'off', | ||
'max-classes-per-file': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'max-len': ['warn', { code: 140 }], | ||
'@typescript-eslint/return-await': 'off', | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
patterns: ['@notifire/shared/*', '@notifire/dal/*', '!import2/good'], | ||
}, | ||
], | ||
}, | ||
}; |
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,92 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Test API | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
pull_request: | ||
paths: | ||
- 'package.json' | ||
- 'yarn.lock' | ||
- 'apps/api/**' | ||
- 'libs/dal/**' | ||
- 'libs/testing/**' | ||
- 'libs/shared/**' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
test_api: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 80 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '15.11.0' | ||
- name: Start Redis | ||
uses: supercharge/[email protected] | ||
|
||
- name: Start MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.2.8 | ||
|
||
- name: restore lerna | ||
uses: actions/cache@master | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
# Runs a single command using the runners shell | ||
- name: Install project dependencies | ||
run: yarn install | ||
|
||
- name: Start Local Stack | ||
env: | ||
AWS_DEFAULT_REGION: us-east-1 | ||
DEFAULT_REGION: us-east-1 | ||
AWS_ACCOUNT_ID: "000000000000" | ||
AWS_ACCESS_KEY_ID: test | ||
AWS_SECRET_ACCESS_KEY: test | ||
AWS_EC2_METADATA_DISABLED: true | ||
working-directory: environment/test | ||
run: | | ||
docker-compose up -d | ||
sleep 10 | ||
max_retry=30 | ||
counter=0 | ||
until $command | ||
do | ||
sleep 1 | ||
[[ counter -eq $max_retry ]] && echo "Failed!" && exit 1 | ||
aws --endpoint-url=http://localhost:4566 s3 ls | ||
echo "Trying again. Try #$counter" | ||
((counter++)) | ||
done | ||
docker-compose logs --tail="all" | ||
aws --endpoint-url=http://localhost:4566 s3 mb s3://notifire-test | ||
# Runs a single command using the runners shell | ||
- name: Bootstrap | ||
run: yarn run bootstrap | ||
|
||
# Runs a single command using the runners shell | ||
- name: Build API | ||
run: CI='' yarn run build:api | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Run a test | ||
run: | | ||
cd apps/api && yarn run test:e2e | ||
yarn 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
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,50 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Test SDK | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
pull_request: | ||
paths: | ||
- 'libs/sdk/**' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
test_sdk: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 80 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '15.11.0' | ||
|
||
- name: restore lerna | ||
uses: actions/cache@master | ||
with: | ||
path: | | ||
node_modules | ||
**/node_modules | ||
/home/runner/.cache/Cypress | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
# Runs a single command using the runners shell | ||
- name: Install project dependencies | ||
run: yarn install | ||
|
||
# Runs a single command using the runners shell | ||
- name: Bootstrap | ||
run: yarn run bootstrap | ||
|
||
# Runs a single command using the runners shell | ||
- name: Build | ||
working-directory: libs/sdk | ||
run: CI='' yarn run build:dev |
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,105 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Test WEB | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
deploy: | ||
description: 'Should deploy' | ||
required: false | ||
default: "true" | ||
pull_request: | ||
paths: | ||
- 'apps/web/**' | ||
- 'libs/shared/**' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
test_web: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 80 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '15.11.0' | ||
- name: Start Redis | ||
uses: supercharge/[email protected] | ||
|
||
- name: Start MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.2.8 | ||
|
||
- name: restore lerna | ||
uses: actions/cache@master | ||
with: | ||
path: | | ||
node_modules | ||
**/node_modules | ||
/home/runner/.cache/Cypress | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
|
||
# Runs a single command using the runners shell | ||
- name: Install project dependencies | ||
run: yarn install | ||
|
||
# Runs a single command using the runners shell | ||
- name: Bootstrap | ||
run: yarn run bootstrap | ||
|
||
- name: Start Local Stack | ||
env: | ||
DEFAULT_REGION: us-east-1 | ||
AWS_DEFAULT_REGION: us-east-1 | ||
AWS_ACCOUNT_ID: "000000000000" | ||
AWS_ACCESS_KEY_ID: test | ||
AWS_SECRET_ACCESS_KEY: test | ||
AWS_EC2_METADATA_DISABLED: true | ||
working-directory: environment/test | ||
run: | | ||
docker-compose up -d | ||
sleep 5 | ||
max_retry=30 | ||
counter=0 | ||
until $command | ||
do | ||
sleep 1 | ||
[[ counter -eq $max_retry ]] && echo "Failed!" && exit 1 | ||
aws --endpoint-url=http://localhost:4566 s3 ls | ||
echo "Trying again. Try #$counter" | ||
((counter++)) | ||
done | ||
aws --endpoint-url=http://localhost:4566 s3 mb s3://notifire-test | ||
# Runs a single command using the runners shell | ||
- name: Build | ||
run: CI='' yarn run build:web | ||
|
||
# Runs a single command using the runners shell | ||
- name: Start Client | ||
run: yarn run start:web & | ||
|
||
- name: Cypress run | ||
uses: cypress-io/github-action@v2 | ||
env: | ||
NODE_ENV: test | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
record: true | ||
working-directory: apps/web | ||
start: yarn run start:api | ||
wait-on: http://localhost:1336/v1/health-check | ||
browser: chrome | ||
headless: true |
Oops, something went wrong.