Skip to content

Commit

Permalink
ci: add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
roushou committed Jun 19, 2024
1 parent ffe71c5 commit c5a9ea5
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
check:
name: Check
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
pnpm-version: [9.3.0]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Set pnpm store directory path
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
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 dependencies
run: pnpm install

- name: Lint
run: pnpm ci --reporter=github

- name: TypeCheck
run: pnpm typecheck

0 comments on commit c5a9ea5

Please sign in to comment.