explorer-app/.github/workflows/ci.yml
2024-09-17 16:13:49 +02:00

38 lines
1 KiB
YAML

name: CI
on:
push:
branches: [main, v3]
pull_request:
branches: [main, v3]
jobs:
codechecks:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
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-store-
- name: Install package dependencies
run: pnpm install
- name: Lint the code
run: pnpm run lint