From 235dfe134fb1de06cca153d9a72f03b7b1dbedde Mon Sep 17 00:00:00 2001 From: Mikita Kandratsyeu Date: Wed, 22 May 2024 13:38:18 +0300 Subject: [PATCH 1/2] addded yml file --- .github/workflows/ci..yml | 45 +++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/ci..yml diff --git a/.github/workflows/ci..yml b/.github/workflows/ci..yml new file mode 100644 index 00000000..b8a1cc83 --- /dev/null +++ b/.github/workflows/ci..yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: CodeBuild + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: 20.x + + - name: Checking node_modules cache + uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + + - name: Install packages + uses: borales/actions-yarn@v4 + with: + cmd: install + + - name: ESLint + uses: borales/actions-yarn@v4 + with: + cmd: lint:ci + + - name: Type Check + uses: borales/actions-yarn@v4 + with: + cmd: type:check + + - name: CodeBuild + uses: borales/actions-yarn@v4 + with: + cmd: build diff --git a/package.json b/package.json index 359bb17c..62dd9b2e 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "build": "next build", "start": "next start", "lint": "next lint", + "lint:ci": "next lint --quiet", "lint-staged": "lint-staged --quiet", "postinstall": "prisma generate", "prepare": "husky || true", From f1226df36bdd0558c03f01e1bcf5631c8af30bb7 Mon Sep 17 00:00:00 2001 From: Mikita Kandratsyeu Date: Wed, 22 May 2024 13:42:32 +0300 Subject: [PATCH 2/2] chore: updated yml --- .github/workflows/ci..yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci..yml b/.github/workflows/ci..yml index b8a1cc83..6822d527 100644 --- a/.github/workflows/ci..yml +++ b/.github/workflows/ci..yml @@ -38,8 +38,3 @@ jobs: uses: borales/actions-yarn@v4 with: cmd: type:check - - - name: CodeBuild - uses: borales/actions-yarn@v4 - with: - cmd: build