Skip to content

Commit

Permalink
Updated dependencies and applied better formatters.
Browse files Browse the repository at this point in the history
  • Loading branch information
gguridi committed Nov 29, 2022
1 parent aadbc2e commit 9ef83fe
Show file tree
Hide file tree
Showing 18 changed files with 10,373 additions and 44,588 deletions.
39 changes: 19 additions & 20 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "16.13.1"
}
},
"extends": [
"eslint:recommended",
"react",
"plugin:react/recommended"
],
"plugins": [
"react"
]
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "16.13.1"
}
},
"extends": [
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"react-app"
],
"plugins": ["react"]
}
72 changes: 36 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Release

on:
release:
type: [created]
on:
release:
type: [created]

jobs:
unit-testing:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 13
- name: install dependencies
run: npm install
- name: run tests
run: npm test
unit-testing:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- name: install dependencies
run: yarn install
- name: run tests
run: yarn test

deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs:
- unit-testing
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install Packages
run: npm install
- name: Build page
run: npm run build --verbose
env:
CI: false
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./build
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs:
- unit-testing
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install Packages
run: yarn install
- name: Build page
run: yarn run build --verbose
env:
CI: false
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./build
34 changes: 17 additions & 17 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ name: Testing
on: push

jobs:
unit-testing:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 13
- name: install dependencies
run: npm install
- name: run tests
run: npm run test:ci
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
unit-testing:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: install dependencies
run: yarn install
- name: run tests
run: yarn run test:ci
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.history/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 120,
"tabWidth": 2,
"singleQuote": false,
"trailingComma": "all"
}
2 changes: 1 addition & 1 deletion EXERCISES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in the behaviour of the menu.
## Advanced exercises

1. Render the src/images/logo.svg at the top of the Sudoku board, adding unit
tests to ensure the logo is rendered properly in the application.
tests to ensure the logo is rendered properly in the application.

This exercise involve javascript and the way to import images, embedding them
into our code. Webpack is not ready to handle it.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Synopsis

[![Benchmark](https://github.com/gguridi/exercise-react/actions/workflows/release.yml/badge.svg?branch=master)](https://github.com/gguridi/exercise-react/actions/workflows/release.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d1cd1dc3fafb4086802a9a4a79b39189)](https://www.codacy.com/gh/gguridi/exercise-react/dashboard?utm_source=github.com&utm_medium=referral&utm_content=gguridi/exercise-react&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d1cd1dc3fafb4086802a9a4a79b39189)](https://www.codacy.com/gh/gguridi/exercise-react/dashboard?utm_source=github.com&utm_medium=referral&utm_content=gguridi/exercise-react&utm_campaign=Badge_Grade)
[![codecov](https://codecov.io/gh/gguridi/exercise-react/branch/master/graph/badge.svg?token=IUDIfrcUOY)](https://codecov.io/gh/gguridi/exercise-react)

This is a basic website intended to work with React and Bootstrap. This website gives a basic
Expand Down Expand Up @@ -77,15 +77,15 @@ Then, from the folder we have cloned the code, we can see a `package.json` file.
This file contains the dependencies of our project. To install them type:

```bash
npm install
yarn install
```

This will create a folder called `.node_modules` that will contain the dependencies.

Once the dependencies are there, we can start the development server with:

```bash
npm run start
yarn run start
```

This will start a development server listening by default in the port 8080. To
Expand Down Expand Up @@ -139,7 +139,7 @@ The tests are located altogether with the code, under the .test.js extension.
We can run the tests from inside the container or from outside, with:

```bash
npm run test
yarn run test
```

The command will output the results of the tests. If any assertion didn't succeed, the
Expand Down
Loading

0 comments on commit 9ef83fe

Please sign in to comment.