Skip to content

Create hosty Github action #19

Create hosty Github action

Create hosty Github action #19

Workflow file for this run

name: Tests
on:
push:
branches: [main]
paths-ignore: ['docs/**', '**/README.md']
pull_request:
paths-ignore: ['docs/**', '**/README.md']
jobs:
get-hosty-test-files:
runs-on: ubuntu-latest
outputs:
test-files: ${{ steps.set-matrix.outputs.test-files }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: echo "test-files=$(cd packages/hosty && ls tests/*.test.ts | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
test-hosty:
needs: [get-hosty-test-files]
runs-on: ubuntu-latest
strategy:
matrix:
test-file: ${{fromJson(needs.get-hosty-test-files.outputs.test-files)}}
steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter hosty build
- run: pnpm run --filter hosty test ${{matrix.test-file}}