Skip to content

Commit

Permalink
Create test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
YvesCandel authored Oct 1, 2024
1 parent 6d65168 commit 389f348
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run unit tests

on:
push:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22.x

- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
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@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile

- name: Run unit tests
shell: bash
run: pnpm run test

0 comments on commit 389f348

Please sign in to comment.