From 59bd74713b8e942012405f5acc3f3710788b1f37 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Tue, 11 Jun 2024 12:59:15 +0530 Subject: [PATCH 1/3] feat: ci checks for linting and typecheck --- .github/workflows/linting.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/typecheck.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/typecheck.yml diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 00000000..f9854dd0 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,31 @@ +name: Code quality - linting + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize] + +jobs: + linting: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: "yarn" + cache-dependency-path: frontend/yarn.lock + + - run: yarn install + + - name: Linting + run: yarn lint:js + + - name: Prettier + run: yarn format diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 00000000..5a150e04 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,28 @@ +name: Code quality - typecheck + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize] + +jobs: + typecheck: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: "yarn" + cache-dependency-path: frontend/yarn.lock + + - run: yarn install + + - name: Typechecking + run: yarn tsc:compile From eff9a87af9b23357287d8f5701a7c384bfbc670c Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Wed, 12 Jun 2024 11:34:44 +0530 Subject: [PATCH 2/3] chore: single workflow for linting and typecheck --- .github/workflows/linting.yml | 5 ++++- .github/workflows/typecheck.yml | 28 ---------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/typecheck.yml diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index f9854dd0..b27f9784 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,4 +1,4 @@ -name: Code quality - linting +name: Code quality - linting and typechecking on: push: @@ -29,3 +29,6 @@ jobs: - name: Prettier run: yarn format + + - name: Typechecking + run: yarn tsc:compile diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml deleted file mode 100644 index 5a150e04..00000000 --- a/.github/workflows/typecheck.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Code quality - typecheck - -on: - push: - branches: - - master - pull_request: - types: [opened, synchronize] - -jobs: - typecheck: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./frontend - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20.x - cache: "yarn" - cache-dependency-path: frontend/yarn.lock - - - run: yarn install - - - name: Typechecking - run: yarn tsc:compile From d290613a80b7cc82b0943843fee7a0d99dea54c6 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Wed, 12 Jun 2024 12:04:26 +0530 Subject: [PATCH 3/3] fix: module not found errors --- .github/workflows/linting.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b27f9784..4bd5ecb8 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -23,6 +23,7 @@ jobs: cache-dependency-path: frontend/yarn.lock - run: yarn install + - run: yarn prepare:http - name: Linting run: yarn lint:js