feat: add install and build commands to node ci workflow
This commit is contained in:
14
.github/workflows/node-ci.yml
vendored
14
.github/workflows/node-ci.yml
vendored
@@ -21,6 +21,9 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
|
install_command:
|
||||||
|
type: string
|
||||||
|
default: "pnpm install --frozen-lockfile"
|
||||||
format_command:
|
format_command:
|
||||||
type: string
|
type: string
|
||||||
default: "pnpm format:check"
|
default: "pnpm format:check"
|
||||||
@@ -33,6 +36,9 @@ on:
|
|||||||
test_command:
|
test_command:
|
||||||
type: string
|
type: string
|
||||||
default: "pnpm test"
|
default: "pnpm test"
|
||||||
|
build_command:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
secrets:
|
secrets:
|
||||||
ssh_private_key:
|
ssh_private_key:
|
||||||
required: false
|
required: false
|
||||||
@@ -99,7 +105,8 @@ jobs:
|
|||||||
${{ runner.os }}-pnpm-
|
${{ runner.os }}-pnpm-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
if: ${{ inputs.install_command != '' }}
|
||||||
|
run: ${{ inputs.install_command }}
|
||||||
working-directory: ${{ inputs.working_directory }}
|
working-directory: ${{ inputs.working_directory }}
|
||||||
|
|
||||||
- name: Run format check
|
- name: Run format check
|
||||||
@@ -121,3 +128,8 @@ jobs:
|
|||||||
if: ${{ inputs.test_command != '' }}
|
if: ${{ inputs.test_command != '' }}
|
||||||
run: ${{ inputs.test_command }}
|
run: ${{ inputs.test_command }}
|
||||||
working-directory: ${{ inputs.working_directory }}
|
working-directory: ${{ inputs.working_directory }}
|
||||||
|
|
||||||
|
- name: Run build
|
||||||
|
if: ${{ inputs.build_command != '' }}
|
||||||
|
run: ${{ inputs.build_command }}
|
||||||
|
working-directory: ${{ inputs.working_directory }}
|
||||||
|
|||||||
Reference in New Issue
Block a user