From fbea01ed7d635c66bb55d0a0da4a11fbbb25cd43 Mon Sep 17 00:00:00 2001 From: Daniel Klein Date: Tue, 17 Sep 2024 16:13:49 +0200 Subject: [PATCH] chore:(ci): update github workflow --- .github/workflows/ci.yml | 91 ++++++++++++---------------------------- 1 file changed, 26 insertions(+), 65 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ae4e31..a920ea8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,77 +1,38 @@ name: CI - on: push: - branches: - - main - + branches: [main, v3] pull_request: - branches: - - main - - dev - + branches: [main, v3] jobs: codechecks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 - - uses: actions/cache@v2 + - name: Checkout the repository + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 with: - path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + run_install: false + - name: Install Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: pnpm + - name: Enable Corepack + run: corepack enable + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + - name: Cache the pnpm lock file + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm- - - name: Install Dependencies + ${{ runner.os }}-pnpm-store- + - name: Install package dependencies run: pnpm install - - name: Typecheck - run: pnpm run typecheck - - name: Lint + - name: Lint the code run: pnpm run lint - - # build: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: pnpm/action-setup@v2 - # - uses: actions/setup-node@v3 - # with: - # node-version: 16.x - # cache: pnpm - - # - name: Install - # run: pnpm install - - # - name: Build - # run: pnpm run build - - # test-e2e: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/cache@v3 - # with: - # path: | - # ~/.cache - # key: cypress-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} - - # - uses: pnpm/action-setup@v2 - - # - uses: pnpm/action-setup@v2 - # - uses: actions/setup-node@v3 - # with: - # node-version: 16.x - # cache: pnpm - - # - name: Install - # run: pnpm install - - # - name: Cypress PNPM Patch - # run: cp pnpm-lock.yaml package-lock.json - - # - name: Cypress [Hub] - # uses: cypress-io/github-action@v4 - # with: - # install-command: echo - # build: pnpm hub:generate - # start: pnpm hub:preview