Skip to content

Commit

Permalink
feat: initial commit - rebased
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Foureur authored and Esya committed Apr 20, 2021
0 parents commit 150f2d2
Show file tree
Hide file tree
Showing 247 changed files with 56,576 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .babel-plugin-macrosrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
styledComponents: {
displayName: process.env.NODE_ENV !== 'production',
},
};
23 changes: 23 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false
require_base: yes
require_head: yes
branches: null

# new section in the root YAML, flag_management:
flag_management:
# this section will govern all default rules of Flags
default_rules:
carryforward: boolean?
ignore: [path]?
paths: [path]?
statuses: [ #note, statuses are an array
name_prefix: string (r"^[\w\-\.]+$")
type: OR("project", "patch", "changes")
target: OR("auto", percent)?
include_changes: OR("auto", precent)?
threshold: percent?
**normal status attributes
]?
3 changes: 3 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BROWSER=none
EXTEND_ESLINT=true
FAST_REFRESH=true
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GENERATE_SOURCEMAP=false
REACT_APP_GRPC_ADDRESS=https://grpc.testnet.oasis-wallet.com
REACT_APP_EXPLORER_ADDRESS=https://explorer.testnet.oasis-wallet.com
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const fs = require('fs')
const path = require('path')

const prettierOptions = JSON.parse(fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'))

module.exports = {
extends: ['react-app', 'prettier'],
plugins: ['prettier'],
rules: {
'prettier/prettier': ['error', prettierOptions],
},
overrides: [
{
files: ['**/*.ts?(x)'],
rules: { 'prettier/prettier': ['warn', prettierOptions] },
},
],
}
201 changes: 201 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes

## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################

# Auto detect
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto

# Source code
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.coffee text
*.css text
*.htm text diff=html
*.html text diff=html
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.ls text
*.map text -diff
*.od text
*.onlydata text
*.php text diff=php
*.pl text
*.ps1 text eol=crlf
*.py text diff=python
*.rb text diff=ruby
*.sass text
*.scm text
*.scss text diff=css
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text diff=html

# Docker
Dockerfile text

# Documentation
*.ipynb text
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

# Templates
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text
*.vue text

# Configs
*.cnf text
*.conf text
*.config text
.editorconfig text
.env text
.gitattributes text
.gitconfig text
.htaccess text
*.lock text -diff
package-lock.json text -diff
*.toml text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text

# Heroku
Procfile text

# Graphics
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.gifv binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary

# Audio
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

# Video
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary

# Archives
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

# Fonts
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary

# Executables
*.exe binary
*.pyc binary

# RC files (like .babelrc or .eslintrc)
*.*rc text

# Ignore files (like .npmignore or .gitignore)
*.*ignore text
90 changes: 90 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn build

jest:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: yarn install --frozen-lockfile
- run: yarn test --coverage
- name: 'Upload coverage report'
uses: actions/upload-artifact@v2
with:
name: jest-coverage
path: coverage
retention-days: 5

cypress:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: yarn install --frozen-lockfile
- run: docker-compose pull
- uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- run: yarn start &
- run: docker-compose up --build -d
- uses: nev7n/wait_for_response@v1
with:
url: 'http://localhost:3000/'
responseCode: 200
timeout: 2000
interval: 500
- run: npx cypress run
- name: 'Upload coverage report'
uses: actions/upload-artifact@v2
with:
name: cypress-coverage
path: cypress-coverage
retention-days: 5

upload-coverage:
needs: [cypress, jest]
runs-on: ubuntu-latest
steps:
- name: Download coverage reports
uses: actions/download-artifact@v2
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./jest-coverage/coverage-final.json
flags: jest
fail_ci_if_error: true # optional (default = false)
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./cypress-coverage/coverage-final.json
flags: cypress
fail_ci_if_error: true # optional (default = false)
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Don't check auto-generated stuff into git
.husky
.nyc_output
cypress-coverage
coverage
build
node_modules
stats.json
.pnp
.pnp.js

# misc
.DS_Store
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.env.development.local
.env.test.local
.env.production.local

# boilerplate internals
generated-cra-app
.cra-template-rb
template

# Docker
node

# Local debug
debug*.c

# Cypress
cypress/screenshots
cypress/videos
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact = true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/dubnium
Loading

0 comments on commit 150f2d2

Please sign in to comment.