Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add bun #173

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 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
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