From f18397f52db8cc22c7f7d1d747c37e704a5655af Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 12:54:28 +0400 Subject: [PATCH 1/9] [general] add ci workflow --- .github/workflows/build.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b95c8ed..d1a9df6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,4 @@ -name: NodeJS with Webpack - +name: CI on: push: branches: [ "main" ] @@ -8,21 +7,27 @@ on: jobs: build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x, 16.x, 18.x] + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: 20.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Lint project + run: pnpm Lint + + - name: Type check project + run: pnpm typecheck - - name: Build - run: | - npm install - npx webpack + - name: Build project + run: pnpm build From 5e9202eb7dd22e11f65a0d2a291cc54158ffcf49 Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 12:56:02 +0400 Subject: [PATCH 2/9] [gh-action] rename workflow --- .github/workflows/{build.yml => CI.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yml => CI.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/CI.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/CI.yml From 06274c9890eff943a5dcd8120f66598e493d1609 Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 12:56:26 +0400 Subject: [PATCH 3/9] [gh-action] fix typo --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d1a9df6..c70834f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,7 +24,7 @@ jobs: run: pnpm install - name: Lint project - run: pnpm Lint + run: pnpm lint - name: Type check project run: pnpm typecheck From a9552b591ff60f7f59db472e4613da4da484bd07 Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 13:00:16 +0400 Subject: [PATCH 4/9] [gh-action] move to ubuntu latest --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c70834f..c290fe7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From cb7dc0a54c87a5711a0a39ac7ac7bbdde579ca6b Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 13:03:28 +0400 Subject: [PATCH 5/9] Revert "[gh-action] move to ubuntu latest" This reverts commit a9552b591ff60f7f59db472e4613da4da484bd07. --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c290fe7..c70834f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 From b0a62e5648e518c8e57a953ef46465d9adc054d9 Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 13:17:34 +0400 Subject: [PATCH 6/9] [gh-action] handle namings --- .github/workflows/CI.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c70834f..200a1b4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,27 +7,27 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: version: 8 - - name: Use Node.js ${{ matrix.node-version }} + - name: Node V20 uses: actions/setup-node@v3 with: node-version: 20.x cache: 'pnpm' - - name: Install dependencies + - name: Install Dependencies run: pnpm install - - name: Lint project + - name: Lint Project run: pnpm lint - - name: Type check project + - name: Type Check Project run: pnpm typecheck - - name: Build project + - name: Build Project run: pnpm build From ce02b2f1d97f66c3f231b13fe86fb87f7ce1e8a8 Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 14:11:18 +0400 Subject: [PATCH 7/9] [gh-action] check prisma --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 200a1b4..5553286 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,6 +23,9 @@ jobs: - name: Install Dependencies run: pnpm install + - name: 11111111111111111 + run: pnpm exec prisma generate + - name: Lint Project run: pnpm lint From 11d17c46bc1d1a15b0ce8b62e65682115a9e7ecd Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 14:19:23 +0400 Subject: [PATCH 8/9] [gh-action] note for prisma and pnpm issue --- .github/workflows/CI.yml | 2 +- notes.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5553286..9ccfb1d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: - name: Install Dependencies run: pnpm install - - name: 11111111111111111 + - name: Add generated prisma types run: pnpm exec prisma generate - name: Lint Project diff --git a/notes.md b/notes.md index 385352e..494ab74 100644 --- a/notes.md +++ b/notes.md @@ -1,2 +1,6 @@ - import order for eslint https://dev.to/otamnitram/sorting-your-imports-correctly-in-react-213m + + +-- pnpm issue with prisma +https://github.com/prisma/prisma/issues/2584#issuecomment-646414549 From 69c44ff40227a32162bd5dea7e563a676aadbdd0 Mon Sep 17 00:00:00 2001 From: sabovyan Date: Tue, 21 Nov 2023 14:27:20 +0400 Subject: [PATCH 9/9] [gh-action] remove build from CI --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9ccfb1d..176f46d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,4 +33,4 @@ jobs: run: pnpm typecheck - name: Build Project - run: pnpm build + run: echo "🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉"