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",