Skip to content

Commit

Permalink
ci(actions): add CI workflow (#184)
Browse files Browse the repository at this point in the history
* ci(actions): add CI workflow

* ci(actions): use only node version >= 18

* ci(actions): give ci a nice name
  • Loading branch information
arunanshub authored Feb 9, 2024
1 parent baea02d commit 5900bae
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
push:
branches: ['master']
pull_request:
branches: ['master']

defaults:
run:
shell: bash

jobs:
lint:
strategy:
matrix:
node-version: ['18.*', '20.*']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

name: 'Lint: Node.js ${{ matrix.node-version }} - OS: ${{ matrix.os }}'

steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
key: ${{ runner.os }}-${{ matrix.node-version }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-$${{ matrix.node-version }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Typecheck
run: pnpm nuxi typecheck

- name: Linting
run: pnpm biome ci .

0 comments on commit 5900bae

Please sign in to comment.