Skip to content

Commit

Permalink
ci: update GitHub workflows to improve compatibility and caching
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottewiltshire0 committed Jan 2, 2025
1 parent 3493b10 commit 9cea62e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20.18.0

- name: Install dependencies
run: bun install

- name: Build Next.js App
run: bun run build
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-
11 changes: 10 additions & 1 deletion .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@ on:

jobs:
lighthouse:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Build Next.js app
run: bun run build
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-
- name: Run Lighthouse CI
run: |
npm install -g @lhci/cli
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ on: pull_request

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20.18.0

- name: Install dependencies
run: bun install
Expand Down

0 comments on commit 9cea62e

Please sign in to comment.