mirror of https://github.com/buster-so/buster.git
small cache for build lint test
This commit is contained in:
parent
6e9bd188d6
commit
2744b15c30
|
@ -18,6 +18,10 @@ inputs:
|
|||
description: 'Optional pnpm filter for selective dependency installation'
|
||||
required: false
|
||||
default: ''
|
||||
cache-key:
|
||||
description: 'Optional cache key for the cache action'
|
||||
required: false
|
||||
default: 'default'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
|
@ -33,17 +37,17 @@ runs:
|
|||
node-version: ${{ inputs.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
||||
# Temporarily disabled to force fresh install
|
||||
# - name: Cache node_modules
|
||||
# uses: actions/cache@v4
|
||||
# with:
|
||||
# path: |
|
||||
# node_modules
|
||||
# apps/*/node_modules
|
||||
# packages/*/node_modules
|
||||
# key: pnpm-workspace-v2-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
# restore-keys: |
|
||||
# pnpm-workspace-v2-
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
apps/*/node_modules
|
||||
packages/*/node_modules
|
||||
key: pnpm-workspace-v2-${{ inputs.cache-key }}-${{ github.ref_name }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
pnpm-workspace-v2-${{ inputs.cache-key }}-${{ github.ref_name }}-
|
||||
pnpm-workspace-v2-${{ inputs.cache-key }}-
|
||||
|
||||
- name: Cache Turbo
|
||||
uses: actions/cache@v4
|
||||
|
|
|
@ -23,6 +23,8 @@ jobs:
|
|||
|
||||
- name: Setup Node Environment
|
||||
uses: ./.github/actions/setup-node-env
|
||||
with:
|
||||
cache-key: build-lint-unit
|
||||
|
||||
- name: Build all packages (excluding web)
|
||||
run: pnpm turbo build --filter="!@buster-app/web"
|
||||
|
@ -49,6 +51,8 @@ jobs:
|
|||
|
||||
- name: Setup Node Environment
|
||||
uses: ./.github/actions/setup-node-env
|
||||
with:
|
||||
cache-key: build-lint-unit
|
||||
|
||||
- name: Lint all packages (excluding web)
|
||||
run: pnpm turbo lint
|
||||
|
@ -67,6 +71,8 @@ jobs:
|
|||
|
||||
- name: Setup Node Environment
|
||||
uses: ./.github/actions/setup-node-env
|
||||
with:
|
||||
cache-key: build-lint-unit
|
||||
|
||||
- name: Build required packages
|
||||
run: pnpm turbo build --filter="!@buster-app/web"
|
||||
|
|
|
@ -36,6 +36,7 @@ jobs:
|
|||
uses: ./.github/actions/setup-node-env
|
||||
with:
|
||||
install-filter: "@buster-app/server..."
|
||||
cache-key: docker-build-server
|
||||
|
||||
- name: Mount Turbo cache sticky disk
|
||||
uses: useblacksmith/stickydisk@v1
|
||||
|
|
|
@ -21,6 +21,7 @@ jobs:
|
|||
uses: ./.github/actions/setup-node-env
|
||||
with:
|
||||
install-filter: "@buster-app/trigger..."
|
||||
cache-key: trigger-deployment
|
||||
|
||||
- name: 🚀 Deploy to ${{ github.ref_name == 'main' && 'Production' || 'Staging' }}
|
||||
env:
|
||||
|
|
Loading…
Reference in New Issue