Skip to content

Commit

Permalink
switch to bun within CI and sub tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Tilsch committed Feb 28, 2024
1 parent 003c9c7 commit 3dfd877
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: oven-sh/setup-bun@v1
- name: Setup Node
uses: actions/setup-node@v3
- uses: actions/cache@v4
with:
cache: 'pnpm'
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
- name: Setup Pages
uses: actions/configure-pages@v2
with:
Expand All @@ -51,14 +53,14 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: bun install
- name: Build with Next.js
env:
NEXT_PUBLIC_GAPI_OAUTH_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_GAPI_OAUTH_CLIENT_ID }}
NEXT_PUBLIC_BASE_PATH: /${{ github.event.repository.name }}
run: pnpm build
run: bun run build
- name: Static HTML export with Next.js
run: pnpm build:pages
run: bun run build:pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can get a live preview of the current `develop` branch here: [https://slub.g
First, run the development server:

```bash
pnpm i && pnpm run dev
bun i && bun run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Expand Down Expand Up @@ -53,7 +53,7 @@ all of their props and options. It also gives an overview over the frontend comp

```bash
cd app/exhibition-live
pnpm i && pnpm run storybook
bun i && bun run storybook
```

Open [http://localhost:6006](http://localhost:6006) with your browser to see the storybook.
Expand Down
2 changes: 1 addition & 1 deletion apps/exhibition-live/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test:jsonSchema2Select": "NODE_OPTIONS=--experimental-vm-modules jest --watch --runTestsByPath components/utils/sparql/jsonSchema2Select.test.ts ",
"test:lobidMapping": "NODE_OPTIONS=--experimental-vm-modules jest --watch --runTestsByPath components/config/lobidMappings.test.ts",
"test:parseMarkdownLink": "NODE_OPTIONS=--experimental-vm-modules jest --watch --runTestsByPath components/utils/core/parseMarkdownLink.test.ts ",
"build:pages": "next build && mv ./dist ../../_site && storybook build && mv ./storybook-static ../../_site/storybook",
"build:pages": "next build && mv ./out ../../_site && storybook build && mv ./storybook-static ../../_site/storybook",
"linkml:json-schema": "docker run --rm -v ${PWD}/schema:/work -w /work -ti linkml/linkml:1.4 bash -c 'gen-json-schema ./exhibition-info.yaml > ./exhibition-info.schema.json'",
"linkml:ontology": "docker run --rm -v ${PWD}/schema:/work -w /work -ti linkml/linkml:1.4 bash -c 'gen-owl --no-metaclasses --no-type-objects --metadata-profile rdfs ./exhibition-info.yaml -o ./exhibition-info.owl.ttl'",
"linkml:interactive": "docker run --rm -v ${PWD}/schema:/work -w /work -ti linkml/linkml:1.4",
Expand Down
Binary file added bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"precommit": "pnpm run lint:fix && pnpm run format"
"precommit": "bun run lint:fix && bun run format"
},
"workspaces": [
"apps/*",
Expand Down

0 comments on commit 3dfd877

Please sign in to comment.