Skip to content

Commit

Permalink
feat: run tests before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-shuman committed Sep 22, 2024
1 parent 04cb5a2 commit 216666e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,35 @@ on:
branches: [main]

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@v4

- name: Install pnpm πŸ—
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- name: Setup node πŸ—
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies πŸ“¦
run: pnpm install

- name: Run tests πŸ§ͺ
run: pnpm vitest

npm:
runs-on: ubuntu-latest
needs: tests

steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@v4
Expand Down Expand Up @@ -37,6 +64,7 @@ jobs:

jsr:
runs-on: ubuntu-latest
needs: tests

permissions:
contents: read
Expand Down

0 comments on commit 216666e

Please sign in to comment.