Skip to content

Commit bf19603

Browse files
authored
Merge pull request #54 from C3-Zally/develop
GO!
2 parents 1b12532 + 4518825 commit bf19603

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+20414
-3050
lines changed

.eslintrc.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2020": true
5+
},
6+
"extends": ["react-app", "prettier"],
7+
"parserOptions": {
8+
"ecmaFeatures": {
9+
"jsx": true
10+
},
11+
"ecmaVersion": 11,
12+
"sourceType": "module"
13+
},
14+
"plugins": ["react", "prettier"],
15+
"rules": {
16+
"prettier/prettier": [
17+
"error",
18+
{
19+
"printWidth": 80,
20+
"trailingComma": "es5",
21+
"semi": true,
22+
"jsxSingleQuote": true,
23+
"singleQuote": true
24+
}
25+
]
26+
}
27+
}

.github/workflows/cd.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# followin https://dev.to/dyarleniber/setting-up-a-ci-cd-workflow-on-github-actions-for-a-react-app-with-github-pages-and-codecov-4hnp
2+
3+
name: CD
4+
5+
on:
6+
push:
7+
branches: [master]
8+
release:
9+
# Only use the types keyword to narrow down the activity types that will trigger your workflow.
10+
types: [published]
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [12.x]
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
23+
- name: Set up Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+
- name: Install dependencies
29+
run: npm install
30+
31+
- name: Deploy
32+
run: |
33+
git remote set-url origin https://${github_token}@github.com/${repository}
34+
npm run deploy
35+
env:
36+
user_name: "github-actions[bot]"
37+
user_email: "github-actions[bot]@users.noreply.github.com"
38+
github_token: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
39+
repository: ${{ github.repository }}

.github/workflows/ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: CI
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master, develop]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [10.x, 12.x]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Install dependencies
27+
run: npm install
28+
- name: Run the tests and generate coverage report
29+
run: npm test -- --coverage
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v1
32+
- name: Build
33+
run: npm run build

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
4+
/node_modules/
55
/.pnp
66
.pnp.js
77
debug.log

.vscode/settings.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"editor.formatOnSave": false,
3+
// turn it off for JS and JSX, we will do this via eslint
4+
"[javascript]": {
5+
"editor.formatOnSave": false
6+
},
7+
"[javascriptreact]": {
8+
"editor.formatOnSave": false
9+
},
10+
// tell the ESLint plugin to run on save
11+
"eslint.validate": ["html", "javascript", "javascriptreact"],
12+
// Optional BUT IMPORTANT: If you have the prettier extension enabled for other languages like CSS and HTML, turn it off for JS since we are doing it through Eslint already
13+
"prettier.disableLanguages": ["javascript", "javascriptreact"],
14+
"eslint.workingDirectories": [
15+
{
16+
"mode": "auto"
17+
}
18+
],
19+
"editor.codeActionsOnSave": {
20+
"source.fixAll.eslint": true
21+
}
22+
}

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
![CI](https://github.com/C3-Zally/frontend/workflows/CI/badge.svg)
2+
![CD](https://github.com/C3-Zally/frontend/workflows/CD/badge.svg)
3+
14
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
25

36
### `npm install`

0 commit comments

Comments
 (0)