Skip to content

fix: stop warning about missing Chromium on Apple Silicon (#318) #487

fix: stop warning about missing Chromium on Apple Silicon (#318)

fix: stop warning about missing Chromium on Apple Silicon (#318) #487

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main, alpha]
jobs:
quality:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile --ignore-scripts
- name: Lint
run: bun run lint
- name: Check formatting
run: bun run format:check
changeset:
# A PR that changes shipped code without a changeset merges fine and then
# releases nothing — `sortFields` (#287) shipped in 2.4.4 and never made
# the changelog that way.
#
# Docs- or CI-only work uses the `skip-changeset` label, read live from the
# API in the step below. An empty changeset
# looks like the tidier answer but is a trap: changesets/action bails on
# "All changesets are empty; not creating PR" *without publishing*, so an
# empty changeset sitting on main blocks any pending release. That is how
# #308 nearly stranded 3.0.1 a second time.
#
# Skipped on the release PR itself, which consumes every changeset.
if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile --ignore-scripts
# The label is read live rather than from github.event.pull_request.labels:
# the payload is frozen at the triggering event, so a label added after the
# PR opened would not count, and even a re-run replays the stale payload.
- name: Require a changeset
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh pr view "${{ github.event.pull_request.number }}" \
--json labels --jq '.labels[].name' | grep -qx 'skip-changeset'; then
echo "skip-changeset label present — no changeset required."
exit 0
fi
bunx changeset status --since=origin/main
smoke-test:
strategy:
matrix:
os: ["ubuntu-22.04", "windows-latest", "macos-latest"]
node-version: ["20", "22"]
# 5.22.0 and 7.0.0 are the floors of the supported majors; 7.10.0 is
# the newest stable. Prisma 8 is deliberately absent — see #315.
prisma-version: ["5.22.0", "6.15.0", "7.0.0", "7.10.0"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
# bun manages dependencies, but the generator and the test runner both
# execute on Node — `bun run` honours the shebang — so the Node matrix
# still covers what consumers actually run.
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: bun install --frozen-lockfile && bunx puppeteer browsers install chrome-headless-shell
- name: Print versions
run: |
node -v
bun -v
- name: build
run: bun run build
- name: test
run: bun run test --run
env:
PRISMA_TEST_VERSIONS: ${{ matrix.prisma-version }}