Skip to content

Commit

Permalink
refactor(components): ✨ add components folder & workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Aug 4, 2022
1 parent d26a2c3 commit 93ef51a
Show file tree
Hide file tree
Showing 15 changed files with 187 additions and 277 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/CODEOWNERS → .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Learn how to add code owners here:

# https://help.github.com/en/articles/about-code-owners

- @navin-moorthy
* @navin-moorthy
34 changes: 0 additions & 34 deletions .github/workflows/build.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/lint.yml

This file was deleted.

126 changes: 126 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: main

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
install:
name: Install node_modules
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile

lint:
name: Lint
needs: install
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile

- name: Lint
run: yarn lint

build:
name: Build
needs: install
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile

- name: Build
run: yarn build

test:
name: Test
needs: install
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile

- name: Test
run: yarn test
41 changes: 0 additions & 41 deletions .github/workflows/test.yml

This file was deleted.

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
Expand Up @@ -54,3 +54,4 @@ yarn.lock
# Library files
dist
CHANGELOG.md
public
34 changes: 31 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"git.branchProtection": ["main"],
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///Users/navin/Documents/github/next-react-app/.github/workflows/build.yml"
}
"editor.tabSize": 2,
"editor.guides.bracketPairs": true,
"editor.rulers": [80, 100, 120],
"editor.wordWrap": "bounded",
"editor.wordWrapColumn": 120,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"files.eol": "\n",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.enable": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.addMissingImports": true,
// "source.organizeImports": true,
// "source.sortImports": true,
// "source.fixAll": true
"source.fixAll.eslint": true
// "source.fixAll.stylelint": true
},
"eslint.enable": true,
"eslint.useESLintClass": true,
"css.validate": false,
"eslint.validate": [
"javascript",
"javascriptreact",
"vue",
"typescript",
"typescriptreact",
"html"
]
}
Loading

0 comments on commit 93ef51a

Please sign in to comment.