Skip to content

feat(repo): move from pnpm to bun #722

feat(repo): move from pnpm to bun

feat(repo): move from pnpm to bun #722

Workflow file for this run

name: ci
on:
push:
branches:
- '*'
- '*/*'
- '**'
pull_request: {}
env:
NODE_OPTIONS: --max-old-space-size=6144
jobs:
commitlint:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
# Required by wagoid/commitlint-github-action
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
# Required by wagoid/commitlint-github-action
fetch-depth: 0
- name: Lint commit messages
uses: wagoid/commitlint-github-action@v5
with:
failOnWarnings: true
helpURL: https://github.com/goetzrobin/spartan/blob/main/CONTRIBUTING.md#-commit-message-guidelines
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- run: npm install -g bun
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
- name: Install
run: bun install --frozen-lockfile --prefer-offline
- name: oxlint performance, correctness and lint check
run: bun run ci.lint-baby
- name: biome fFormatting & sorted iImports check
run: bun run ci.format-sort
# - name: Biome Lint Check // too many failures; let's start with formatting and sorting then get to this
# run: bun run ci.lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- run: npm install -g bun
- run: bun --version
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
- name: Install
run: bun install --frozen-lockfile --prefer-offline
- name: Build
run: bun run build
unit:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- run: npm install -g bun
- run: bun --version
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
- name: Install
run: bun install --frozen-lockfile --prefer-offline
- name: Test
run: bun run test
e2e:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- run: corepack enable
- run: bun --version
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
- name: Install
run: bun install --frozen-lockfile --prefer-offline
- name: Install Cypress
run: bunx cypress install
- name: End-to-end test
run: bun run e2e