Skip to content

Commit

Permalink
[Feature] Environment (#1)
Browse files Browse the repository at this point in the history
[Feature][Environment] Add gatsby, typescript, eslint/tslint/stylelint, prettier, git hooks, docker, github actions (CI/CD), tests
  • Loading branch information
LyulyaevMaxim authored Aug 8, 2020
1 parent 451930a commit ea3fafb
Show file tree
Hide file tree
Showing 64 changed files with 25,518 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
3 changes: 3 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
isDev=true
isTest=false
isProduction=false
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
isDev=false
isTest=false
isProduction=true
3 changes: 3 additions & 0 deletions .env.tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
isDev=false
isTest=true
isProduction=false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/**/node_modules/*
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI
on: [pull_request, push]

jobs:
linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Installing Dependencies
run: yarn

- name: Formatting
id: formatting
run: yarn format:check && echo ::set-output name=status::success

- name: CSS
id: css
continue-on-error: true
run: yarn lint:css && echo ::set-output name=status::success

- name: JS
id: js
continue-on-error: true
run: yarn lint:js && echo ::set-output name=status::success

- name: Check on failures
if: steps.formatting.outputs.status != 'success' && steps.css.outputs.status != 'success' || steps.js.outputs.status != 'success'
run: echo ${{ toJson(steps) }} && exit 1

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

# - name: Installing Dependencies
# run: yarn
#
# - name: Unit
# id: unit
# continue-on-error: true
# run: yarn test:unit && echo ::set-output name=status::success
#
# - name: Check on failures
# if: steps.unit.outputs.status != 'success'
# run: echo ${{ toJson(steps) }} && exit 1

deploy:
needs: [linters, tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Installing Dependencies
run: yarn

- name: Building application
run: yarn build

- name: Deploying application
run: yarn netlify deploy -s ${{ secrets.NETLIFY_SITE_ID }} --auth ${{ secrets.NETLIFY_ACCESS_TOKEN }}
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.idea
/public
/**/node_modules
/**/.cache
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

/cypress
/storybook-static
*.sw*
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12.18.3
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public
/node_modules/
**/.cache
yarn.lock
./yarn
.yarn
LICENSE
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"singleQuote": true,
"semi": false,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"endOfLine": "lf"
}
Loading

0 comments on commit ea3fafb

Please sign in to comment.