Skip to content

Commit

Permalink
feat: add workflow to check code
Browse files Browse the repository at this point in the history
  • Loading branch information
vafanassieff committed Nov 19, 2023
1 parent faedd29 commit 1e7a85f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Check

on:
push:
pull_request:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
run_install: false

- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
shell: bash
id: pnpm-config

- id: cache-rotation
shell: bash
run: echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-

- run: pnpm install --frozen-lockfile --prefer-offline --silent
shell: bash
env:
HUSKY: 0

- run: pnpm type-check

- run: pnpm lint

- run: pnpm test

0 comments on commit 1e7a85f

Please sign in to comment.