chore:(ci): update github workflow

This commit is contained in:
Daniel Klein 2024-09-17 16:13:49 +02:00
parent 75f5e2c57b
commit fbea01ed7d

View file

@ -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