Skip to content

Commit

Permalink
feat: github action workflow 추가 (#52)
Browse files Browse the repository at this point in the history
* feat: github action workflow 추가

* feat: github action workflow 추가

* feat: github action workflow 추가

* feat: github action workflow 추가
  • Loading branch information
yonghyun421 authored Apr 25, 2024
1 parent c56d4ab commit af1ebbf
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
"version": "18.2.0"
}
}
}
}
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Use Node.js 20.11.1
uses: actions/setup-node@v2
with:
node-version: '20.11.1'
cache: 'yarn'
cache-dependency-path: '**/.yarn/releases/*.cjs'

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Run tests
run: yarn test --passWithNoTests
5 changes: 3 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
export PATH="$(yarn bin):$PATH"
if [ -n "$(git diff --cached --name-only --diff-filter=ACM | grep \\.js$)" ]; then
# Check for any .js or .tsx files that have been added, copied, or modified
if [ -n "$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|tsx)$')" ]; then
echo "Running linters..."
yarn lint-staged
fi
fi
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"singleQuote": false,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 120,
"parser": "babel",
"bracketSpacing": true,
"arrowParens": "avoid"
}

Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
import "@testing-library/jest-dom";

0 comments on commit af1ebbf

Please sign in to comment.