feat: Add test JSR package #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Checks | |
on: | |
pull_request: | |
jobs: | |
changesets: | |
name: Changeset Present? | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin main:main | |
- uses: pnpm/action-setup@v2 | |
name: Install PNPM | |
with: | |
version: 9.0.5 | |
- uses: actions/cache@v3 | |
name: setup PNPM cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os}}-pnpm-store | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- run: pnpm i --frozen-lockfile | |
- run: pnpm changeset:ci | |
test: | |
name: Test changed | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Need this to be able to run turbo in compare mode | |
fetch-depth: 0 | |
# pulls stuff down | |
- run: git fetch origin main:main | |
- uses: pnpm/action-setup@v2 | |
name: Install PNPM | |
with: | |
version: 9.0.5 | |
- uses: actions/cache@v3 | |
name: Setup PNPM cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os}}-pnpm-store | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- run: pnpm i --frozen-lockfile | |
- run: pnpm test:changed | |
- name: Upload code coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report | |
path: '**/html/**/*' | |
format: | |
name: Format checker | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
name: Install PNPM | |
with: | |
version: 9.0.5 | |
- uses: actions/cache@v3 | |
name: Setup PNPM cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os}}-pnpm-store | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- run: pnpm i --frozen-lockfile | |
- run: pnpm prettier:check | |
linter: | |
name: Lint checker | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
name: Install PNPM | |
with: | |
version: 9.0.5 | |
- uses: actions/cache@v3 | |
name: Setup PNPM cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os}}-pnpm-store | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- run: pnpm i --frozen-lockfile | |
- run: pnpm build | |
- run: pnpm lint |