Skip to content

Commit

Permalink
feat: bun
Browse files Browse the repository at this point in the history
  • Loading branch information
RPDeshaies committed Sep 11, 2023
1 parent a67ccd0 commit 1415c0b
Show file tree
Hide file tree
Showing 7 changed files with 19,604 additions and 50,308 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0 #
# Use Node
- name: Use Node
uses: actions/setup-node@v2
# Use Bun
- name: Use Bun
uses: oven-sh/setup-bun@v1
with:
node-version: "18"
bun-version: latest
- name: Install dependencies
run: npm install
run: bun install
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@v1
Expand Down
60 changes: 19 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,24 @@ jobs:
# Checkout
- name: Checkout
uses: actions/checkout@v2
# Use Node
- name: Use Node
uses: actions/setup-node@v2
# Use Bun
- name: Use Bun
uses: oven-sh/setup-bun@v1
with:
node-version: "18"
# Cache
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
bun-version: latest
# Install
- name: Install
run: npm install
run: bun install
# Build
- name: Build
run: |
CONTEXT=production npm run build
CONTEXT=production bun run build
env:
VITE_GITHUB_RUN_NUMBER: ${{github.run_number}}
VITE_GITHUB_SHA: ${{github.sha}}
# Validate
- name: Validate
run: npm run validate
run: bun run validate
# Upload Artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v1
Expand All @@ -55,22 +48,14 @@ jobs:
name: Preview
url: https://${{github.run_id}}--fari.netlify.app
steps:
# Setup
- uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v2
# Use Bun
- name: Use Bun
uses: oven-sh/setup-bun@v1
with:
node-version: "18"
# Cache
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
bun-version: latest
# Install
- name: Install
run: npm install
run: bun install
# Download Artifacts
- name: Download Artifacts
uses: actions/download-artifact@master
Expand All @@ -79,7 +64,7 @@ jobs:
path: dist
# Deploy Preview
- name: Deploy Preview
run: npm run deploy:preview -- --auth ${{secrets.NETLIFY_AUTH_TOKEN}} --alias $GITHUB_RUN_ID
run: bun run deploy:preview -- --auth ${{secrets.NETLIFY_AUTH_TOKEN}} --alias $GITHUB_RUN_ID
deploy-production:
needs: [build]
runs-on: ubuntu-latest
Expand All @@ -90,21 +75,14 @@ jobs:
steps:
# Setup
- uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v2
with:
node-version: "18"
# Cache
- name: Cache
uses: actions/cache@v2
# Use Bun
- name: Use Bun
uses: oven-sh/setup-bun@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
bun-version: latest
# Install
- name: Install
run: npm install
run: bun install
# Download Artifacts
- name: Download Artifacts
uses: actions/download-artifact@master
Expand All @@ -113,4 +91,4 @@ jobs:
path: dist
# Deploy Production
- name: Deploy Production
run: npm run deploy:prod -- --auth ${{secrets.NETLIFY_AUTH_TOKEN}}
run: bun run deploy:prod -- --auth ${{secrets.NETLIFY_AUTH_TOKEN}}
23 changes: 8 additions & 15 deletions .github/workflows/int.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,23 @@ jobs:
# Checkout
- name: Checkout
uses: actions/checkout@v2
# Use Node
- name: Use Node
uses: actions/setup-node@v2
# Use Bun
- name: Use Bun
uses: oven-sh/setup-bun@v1
with:
node-version: "18"
# Cache
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
bun-version: latest
# Install
- name: Install
run: npm install
run: bun install
# Build
- name: Build
run: npm run build
# Install NPM dependencies, cache them correctly
run: bun run build
# Install bun dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5
with:
start: npm run serve:build
start: bun run serve:build
- name: Upload Cypress Videos
uses: actions/upload-artifact@v3
if: always()
Expand Down
Binary file added bun.lockb
Binary file not shown.
25 changes: 0 additions & 25 deletions lib/hooks/useBlocker/useBlocker.tsx

This file was deleted.

Loading

0 comments on commit 1415c0b

Please sign in to comment.