Skip to content

Bump the minor group across 4 directories with 5 updates #160

Bump the minor group across 4 directories with 5 updates

Bump the minor group across 4 directories with 5 updates #160

Workflow file for this run

name: Cross-Platform Smoke Tests
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
# Allow manual trigger for testing
workflow_dispatch:
permissions:
contents: read
# Only run on release PRs (created by changesets), PRs with "smoke-tests" label, or manual triggers
# This avoids running expensive multi-platform tests on every PR
jobs:
check-if-release-pr:
name: Check if Release PR
runs-on: ubuntu-latest
permissions: {}
outputs:
is-release-pr: ${{ steps.check.outputs.is-release-pr }}
steps:
- id: check
run: |
if [[ "${{ github.event.pull_request.title }}" == *"[Changesets]"* ]] || [[ "${{ contains(github.event.pull_request.labels.*.name, 'smoke-tests') }}" == "true" ]] || [[ "${{ github.event_name }}" == "workflow_dispatch" ]] || [[ "${{ github.event_name }}" == "push" ]]; then
echo "is-release-pr=true" >> $GITHUB_OUTPUT
else
echo "is-release-pr=false" >> $GITHUB_OUTPUT
fi
build:
name: Build and Pack Libraries
needs: check-if-release-pr
if: needs.check-if-release-pr.outputs.is-release-pr == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Cache bun dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22.x'
- name: Install dependencies
run: bun install
- name: Enable turborepo build cache
uses: rharkor/caching-for-turbo@v2.3.11
- name: Build varlock and integrations
run: bun run build:libs
- name: Build varlock binaries
run: |
echo "=== build-binaries.ts content check ==="
grep -n 'bytecode' packages/varlock/scripts/build-binaries.ts || echo "no bytecode references found"
echo "=== building ==="
cd packages/varlock && bun run build:binaries
- name: Pack varlock packages
run: |
mkdir -p packed-packages
cd packages/varlock
bun pm pack --destination ../../packed-packages
cd ../integrations/astro
bun pm pack --destination ../../../packed-packages
cd ../nextjs
bun pm pack --destination ../../../packed-packages
- name: Upload packed packages
uses: actions/upload-artifact@v6
with:
name: packed-packages
path: packed-packages/*.tgz
retention-days: 1
- name: Upload varlock binary (linux-x64)
uses: actions/upload-artifact@v6
with:
name: varlock-binary-linux-x64
path: packages/varlock/dist-sea/linux-x64/varlock
retention-days: 1
- name: Upload varlock binary (macos-arm64)
uses: actions/upload-artifact@v6
with:
name: varlock-binary-macos-arm64
path: packages/varlock/dist-sea/macos-arm64/varlock
retention-days: 1
- name: Upload varlock binary (win-x64)
uses: actions/upload-artifact@v6
with:
name: varlock-binary-win-x64
path: packages/varlock/dist-sea/win-x64/varlock.exe
retention-days: 1
smoke-test:
name: Smoke Test (${{ matrix.os }})
needs: [check-if-release-pr, build]
if: needs.check-if-release-pr.outputs.is-release-pr == 'true'
runs-on: ${{ matrix.os }}
permissions:
contents: read
actions: read
checks: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: ['22.x']
include:
- os: ubuntu-latest
binary-artifact: varlock-binary-linux-x64
binary-name: varlock
- os: macos-latest
binary-artifact: varlock-binary-macos-arm64
binary-name: varlock
- os: windows-latest
binary-artifact: varlock-binary-win-x64
binary-name: varlock.exe
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Download packed packages
uses: actions/download-artifact@v7
with:
name: packed-packages
path: packed-packages
- name: Download varlock binary
uses: actions/download-artifact@v7
with:
name: ${{ matrix.binary-artifact }}
path: packages/varlock/dist-sea
- name: Make binary executable
if: runner.os != 'Windows'
run: chmod +x packages/varlock/dist-sea/varlock
- name: Update smoke-tests to use packed packages
run: node smoke-tests/update-to-packed.js
- name: Install smoke tests deps
run: cd smoke-tests && pnpm install
- name: Run smoke tests
run: cd smoke-tests && pnpm test