Skip to content

Commit

Permalink
build: add bun
Browse files Browse the repository at this point in the history
includes many changes needed for this to work
  • Loading branch information
davidlj95 committed Nov 9, 2023
1 parent f289cd3 commit 3769c81
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 16,407 deletions.
23 changes: 12 additions & 11 deletions .ci/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
.PHONY: *

prebuild:
npm run prebuild

# First so that running without command runs a build
build: prebuild
npm run prerender
npm run postbuild
cd .. && bun run prerender
cd .. && bun run postbuild

prebuild:
cd .. && bun run bun:prebuild

install:
# So @ngaox/seo installs (declares peer dep of Angular 15)
npm ci --legacy-peer-deps
# https://bun.sh/docs/cli/install#production-mode
bun install --frozen-lockfile

lint:
npm run lint -- --max-warnings 0
bun run lint -- --max-warnings 0

test:
npm run test -- --browsers=ChromeHeadless --no-watch --no-progress --reporters progress --code-coverage
bun run test -- --browsers=ChromeHeadless --no-watch --no-progress --reporters progress --code-coverage

run-main:
cd .. && act
Expand All @@ -24,7 +25,7 @@ reset:
docker ps -a --format '{{.Names}}' | grep -e '^act-' | xargs docker rm -f

format-check:
cd .. && npm run format-check-all
cd .. && bun run bun:format-check-all

lighthouse:
cd .. && npx --yes @lhci/[email protected] autorun
cd .. && bun x --yes @lhci/[email protected] autorun
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.lockb binary diff=lockb
16 changes: 12 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ description: Checks out the repository and installs tooling
runs:
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
node-version-file: '.node-version'
cache: 'npm'
bun-version: latest
- name: Cache dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
env:
cache-name: bun-cache
with:
# Default as per docs 👇
# https://bun.sh/docs/runtime/bunfig#install-cache
path: ~/.bun/install/cache
key: ${{ env.cache-name }}-${{ hashFiles('**/bun.lockb') }}
- name: Install dependencies
shell: bash
run: cd .ci && make install
Binary file added bun.lockb
Binary file not shown.
Loading

0 comments on commit 3769c81

Please sign in to comment.