feat: add build
This commit is contained in:
45
.github/workflows/job-build.yaml
vendored
Normal file
45
.github/workflows/job-build.yaml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Build
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
DO_NOT_TRACK: '1'
|
||||
NODE_VERSION: '23.x'
|
||||
PNPM_VERSION: 10.18.0
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '${{ env.NODE_VERSION }}'
|
||||
registry-url: '${{ env.NODE_REGISTRY }}'
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm test
|
||||
Reference in New Issue
Block a user