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