Skip to content

Commit aa2abb1

Browse files
committed
ci(workflow): split runtime steps for clarity
1 parent a5658d6 commit aa2abb1

2 files changed

Lines changed: 26 additions & 16 deletions

File tree

.github/workflows/publish-npm-github.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ on:
1616
JSON array of package scopes/names to publish (e.g., '["com.onesignal.unity.core", "com.onesignal.unity.android"]')
1717
If empty, publishes the root package.json
1818
default: "[]"
19-
runtime:
19+
toolchain:
2020
required: false
2121
type: string
22-
description: Runtime to use for install & build ("bun" or "vp")
22+
description: Toolchain to use for install & build ("bun" or "vite-plus")
2323
default: bun
2424
secrets:
2525
GH_PUSH_TOKEN:
@@ -45,26 +45,26 @@ jobs:
4545
ref: ${{ inputs.branch }}
4646

4747
- name: Setup Bun
48-
if: inputs.runtime == 'bun'
48+
if: inputs.toolchain == 'bun'
4949
uses: oven-sh/setup-bun@v2
5050
with:
5151
bun-version: latest
5252

5353
- name: Setup Vite+
54-
if: inputs.runtime == 'vp'
54+
if: inputs.toolchain == 'vite-plus'
5555
uses: voidzero-dev/setup-vp@v1
5656
with:
5757
cache: yes
5858
run-install: true
5959

6060
- name: Install & Build (Bun)
61-
if: inputs.runtime == 'bun'
61+
if: inputs.toolchain == 'bun'
6262
run: |
6363
bun install --frozen-lockfile
6464
bun run build
6565
6666
- name: Build (Vite+)
67-
if: inputs.runtime == 'vp'
67+
if: inputs.toolchain == 'vite-plus'
6868
run: vp pack
6969

7070
- name: Setup Node

.github/workflows/wrapper-js-ci.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ on:
1010
type: string
1111
description: Java version to use
1212
default: "17"
13-
runtime:
13+
toolchain:
1414
required: false
1515
type: string
16-
description: Runtime to use for install, lint & test ("bun" or "vp")
16+
description: Toolchain to use for install, lint & test ("bun" or "vite-plus")
1717
default: bun
1818
bun_version:
1919
required: false
2020
type: string
21-
description: Bun version to use (only when runtime is "bun")
21+
description: Bun version to use (only when toolchain is "bun")
2222
default: latest
2323

2424
jobs:
@@ -38,24 +38,34 @@ jobs:
3838
uses: OneSignal/actions/.github/actions/setup-clang@main
3939

4040
- name: Set up Bun
41-
if: inputs.runtime == 'bun'
41+
if: inputs.toolchain == 'bun'
4242
uses: oven-sh/setup-bun@v2
4343
with:
4444
bun-version: ${{ inputs.bun_version }}
4545

4646
- name: Install (Bun)
47-
if: inputs.runtime == 'bun'
47+
if: inputs.toolchain == 'bun'
4848
run: bun install --frozen-lockfile
4949

5050
- name: Set up Vite+
51-
if: inputs.runtime == 'vp'
51+
if: inputs.toolchain == 'vite-plus'
5252
uses: voidzero-dev/setup-vp@v1
5353
with:
5454
cache: yes
5555
run-install: true
5656

57-
- name: Linting
58-
run: ${{ inputs.runtime == 'vp' && 'vp' || 'bun' }} run lint
57+
- name: Linting (Bun)
58+
if: inputs.toolchain == 'bun'
59+
run: bun run lint
5960

60-
- name: Tests
61-
run: ${{ inputs.runtime == 'vp' && 'vp' || 'bun' }} run test${{ inputs.runtime == 'bun' && ':coverage' || '' }}
61+
- name: Linting (Vite+)
62+
if: inputs.toolchain == 'vite-plus'
63+
run: vp run lint
64+
65+
- name: Tests (Bun)
66+
if: inputs.toolchain == 'bun'
67+
run: bun run test:coverage
68+
69+
- name: Tests (Vite+)
70+
if: inputs.toolchain == 'vite-plus'
71+
run: vp run test

0 commit comments

Comments
 (0)