Skip to content

Commit

Permalink
Adding github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Mar 28, 2024
1 parent 6fc30d2 commit 0f08054
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Setup Node and PNPM dependencies

runs:
using: 'composite'

steps:
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

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

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
if: ${{ steps.pnpm-cache.outputs.cache-hit != 'true' }}
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on: [push]

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Typecheck
run: pnpm typecheck

- name: Lint
run: pnpm lint

- name: Build
run: pnpm build

- name: Test
run: pnpm test

0 comments on commit 0f08054

Please sign in to comment.