From 756b67161a5580ae38a95970de18214bfd361929 Mon Sep 17 00:00:00 2001 From: metonym Date: Tue, 9 Apr 2024 09:43:43 -0700 Subject: [PATCH] ci: break into steps --- .github/workflows/ci.yml | 16 +++++++++++----- .github/workflows/release.yml | 18 +++++++++++++++--- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1e2431..3a041a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,16 @@ jobs: with: bun-version: 1.1.3 - - name: Build and test the library + - name: Install dependencies run: | bun install - bun run playwright install --with-deps - bun build:lib - bun test:unit - bun test:e2e + bun playwright install --with-deps + + - name: Build library + run: bun build:lib + + - name: Run unit tests + run: bun test:unit + + - name: Run e2e tests + run: bun test:e2e diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12824bd..dd3800a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,10 +11,25 @@ jobs: id-token: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.x" registry-url: "https://registry.npmjs.org" + + - uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.1.3 + + - name: Install dependencies + run: bun install + + - name: Build library + run: bun build:lib + + - name: Build package + run: bun build:package + - name: Publish package env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} @@ -22,8 +37,5 @@ jobs: # Currently, only npm supports publishing packages with provenance # https://docs.npmjs.com/generating-provenance-statements run: | - npm install --force - node scripts - node scripts/npm-package cd package npm publish --provenance --access public