Skip to content

Commit

Permalink
ci: Add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xeho91 committed May 28, 2024
1 parent 030a862 commit 4a11bd1
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test

on: [push]

defaults:
run:
shell: bash

env:
CI: true

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4

- name: Enable corepack (for pnpm)
# https://nodejs.org/api/corepack.html
run: corepack enable

- name: Setup the latest Node.js LTS version
# https://github.com/actions/setup-node
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*

- name: Install Node.js dependencies with pnpm
# https://pnpm.io/cli/install
run: >
pnpm install
--frozen-lockfile
- name: Run tests with Vitest
# https://vitest.dev/guide/cli.html
run: >
pnpm vitest run

0 comments on commit 4a11bd1

Please sign in to comment.