added cache
Some checks failed
Some checks failed
This commit is contained in:
@@ -7,56 +7,44 @@ on:
|
|||||||
branches: [main, develop]
|
branches: [main, develop]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
install:
|
install-dependencies:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: oven/bun:alpine
|
image: oven/bun:alpine
|
||||||
outputs:
|
|
||||||
cache-key: ${{ steps.cache-key.outputs.key }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Generate cache key
|
- name: Cache Bun dependencies
|
||||||
id: cache-key
|
uses: actions/cache@v4
|
||||||
run: echo "key=bun-${{ hashFiles('**/bun.lock') }}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Restore node_modules cache
|
|
||||||
id: cache-restore
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ~/.bun/install/cache
|
||||||
key: ${{ steps.cache-key.outputs.key }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install Dependencies
|
||||||
if: steps.cache-restore.outputs.cache-hit != 'true'
|
run: bun i --frozen-lockfile
|
||||||
run: bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Save node_modules cache
|
|
||||||
if: steps.cache-restore.outputs.cache-hit != 'true'
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: node_modules
|
|
||||||
key: ${{ steps.cache-key.outputs.key }}
|
|
||||||
|
|
||||||
type-check:
|
type-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: oven/bun:alpine
|
image: oven/bun:alpine
|
||||||
needs: install
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore node_modules
|
- name: Cache Bun dependencies
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ~/.bun/install/cache
|
||||||
key: ${{ needs.install.outputs.cache-key }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run type checking
|
- name: Run type checking
|
||||||
run: bun run check
|
run: bun run check
|
||||||
@@ -65,18 +53,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: oven/bun:alpine
|
image: oven/bun:alpine
|
||||||
needs: install
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore node_modules
|
- name: Cache Bun dependencies
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ~/.bun/install/cache
|
||||||
key: ${{ needs.install.outputs.cache-key }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run linting
|
- name: Run linting
|
||||||
run: bun run lint:check
|
run: bun run lint:check
|
||||||
@@ -85,18 +76,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: oven/bun:alpine
|
image: oven/bun:alpine
|
||||||
needs: install
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore node_modules
|
- name: Cache Bun dependencies
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ~/.bun/install/cache
|
||||||
key: ${{ needs.install.outputs.cache-key }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: bun run format:check
|
run: bun run format:check
|
||||||
@@ -105,18 +99,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: oven/bun:alpine
|
image: oven/bun:alpine
|
||||||
needs: install
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore node_modules
|
- name: Cache Bun dependencies
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ~/.bun/install/cache
|
||||||
key: ${{ needs.install.outputs.cache-key }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build application
|
- name: Build application
|
||||||
run: bun run build
|
run: bun run build
|
||||||
|
|||||||
Reference in New Issue
Block a user