generated from tksst/typescript-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (99 loc) · 3.16 KB
/
build-lint-test.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Build, Lint and Test
on:
workflow_call:
workflow_dispatch:
pull_request:
push:
branches-ignore:
- main
jobs:
check-skippable:
continue-on-error: true
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
skippable: ${{ steps.check.outputs.should_skip }}
steps:
- id: check
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
test:
name: Test
needs: check-skippable
if: needs.check-skippable.outputs.skippable != 'true'
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0
continue-on-error: true
with:
# Set to true to publish the results as comment to the PR (applicable if workflow run is triggered by PR).
comment_on_pr: false
- name: Checkout the source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
show-progress: false
submodules: recursive
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
standalone: false
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm test
build-lint:
name: Build and Lint
needs: check-skippable
if: needs.check-skippable.outputs.skippable != 'true'
timeout-minutes: 10
runs-on: ubuntu-22.04
steps:
- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0
continue-on-error: true
with:
# Set to true to publish the results as comment to the PR (applicable if workflow run is triggered by PR).
comment_on_pr: false
- name: Checkout the source
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
show-progress: false
submodules: recursive
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
standalone: false
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm lint
action-timeline:
needs:
- check-skippable
- test
- build-lint
# Runs even when the previous job was in error
if: ${{ always() }}
continue-on-error: true
runs-on: ubuntu-22.04
permissions:
actions: read
timeout-minutes: 10
steps:
- uses: Kesin11/actions-timeline@da70beff098ff89b15d279e8bf2f60519a8dadd7 # v2.2.0