Repository navigation
78 lines (75 loc) · 1.99 KB
/
Copy pathtest.yml
File metadata and controls
78 lines (75 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: test
on:
workflow_call:
inputs:
runner:
description: JSON array of runs-on labels, for example ["ubuntu-latest"].
required: false
type: string
default: '["ubuntu-latest"]'
pnpm-version:
required: false
type: string
default: "10.14.0"
node-version:
required: false
type: string
default: "22"
node-architecture:
required: false
type: string
default: ""
registry-url:
required: false
type: string
default: ""
github-packages:
required: false
type: boolean
default: false
lint:
description: Shell for lint. Empty skips it.
required: false
type: string
default: "pnpm lint"
test:
description: Shell for tests. Empty skips it.
required: false
type: string
default: "pnpm test"
run:
description: Extra shell after lint and test. Empty skips it.
required: false
type: string
default: ""
timeout-minutes:
required: false
type: number
default: 30
permissions:
contents: read
jobs:
test:
runs-on: ${{ fromJSON(inputs.runner) }}
timeout-minutes: ${{ inputs.timeout-minutes }}
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v4
- uses: PracticalWorks/.github/.github/actions/setup@v1
with:
pnpm-version: ${{ inputs.pnpm-version }}
node-version: ${{ inputs.node-version }}
node-architecture: ${{ inputs.node-architecture }}
registry-url: ${{ inputs.registry-url }}
github-packages: ${{ inputs.github-packages && 'true' || 'false' }}
- if: inputs.lint != ''
name: lint
run: ${{ inputs.lint }}
- if: inputs.test != ''
name: test
run: ${{ inputs.test }}
- if: inputs.run != ''
name: run
run: ${{ inputs.run }}