From e8ad1472d5755a400eb7c54125ed9ca355277d59 Mon Sep 17 00:00:00 2001 From: Sh031224 <1cktmdgh2@gmail.com> Date: Sun, 5 Sep 2021 22:43:34 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Github=20Actions=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20lint,=20test=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pull-request.yml | 29 +++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..45f3527 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,29 @@ +name: pull-request +on: pull_request +jobs: + eslint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "14.x" + - name: Install yarn + run: npm install -g yarn + - name: Install Packages + run: yarn + - name: Eslint Check + run: yarn lint src/**/*.tsx src/**/*.ts --max-warnings=0 + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "14.x" + - name: Install yarn + run: npm install -g yarn + - name: Install Packages + run: yarn + - name: Testing Code + run: yarn test diff --git a/package.json b/package.json index 6124f43..bd369d8 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "type-check": "tsc", "clear": "rm -rf .serverless && rm -rf .serverless_nextjs", "deploy:dev": "yarn run clear && STAGE=dev serverless --verbose", - "deploy:prod": "yarn run clear && STAGE=prod serverless --verbose" + "deploy:prod": "yarn run clear && STAGE=prod serverless --verbose", + "lint": "eslint" }, "dependencies": { "axios": "^0.21.1",