Commit 91db3ea 1 parent fdeb40d commit 91db3ea Copy full SHA for 91db3ea
File tree 5 files changed +49
-41
lines changed
5 files changed +49
-41
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Test and lint code'
2
+ description : ' Performs tests and linting of all the components in the repo'
3
+ runs :
4
+ using : ' composite'
5
+ steps :
6
+ # install bun
7
+ - name : Install bun for deployment
8
+ uses : oven-sh/setup-bun@v2
9
+ with :
10
+ bun-version : latest
11
+ # install deps
12
+ - name : Install lib deps
13
+ working-directory : ./packages/litlytics
14
+ run : bun install --frozen-lockfile
15
+ - name : Install app deps
16
+ run : bun install --frozen-lockfile
17
+ # lib lint/check/test
18
+ - name : Run lib typecheck
19
+ working-directory : ./packages/litlytics
20
+ run : bun run typecheck
21
+ - name : Run lib tests
22
+ working-directory : ./packages/litlytics
23
+ run : bun run test:ci
24
+
25
+ # main app lint/check/test
26
+ - name : Run app eslint
27
+ run : bun run lint
28
+ - name : Run app typecheck
29
+ run : bun run typecheck
30
+ - name : Run app test
31
+ run : bun run test:ci
Original file line number Diff line number Diff line change 27
27
- name : Checkout repository
28
28
uses : actions/checkout@v4
29
29
30
+ # run test-lint
31
+ - name : Test and lint
32
+ uses : ./.github/actions/test-lint
33
+
30
34
- name : Install bun for deployment
31
35
uses : oven-sh/setup-bun@v2
32
36
with :
Original file line number Diff line number Diff line change 1
1
name : Prerelease litlytics library
2
2
3
3
on :
4
- workflow_run :
5
- # Run after "Test and lint" workflow
6
- workflows : ['Test and lint']
7
- types :
8
- - completed # Only when it's completed
9
- branches :
10
- - main # Only run the publish workflow for pushes to main
4
+ push :
5
+ branches : ['main'] # Only run the publish workflow for pushes to main
11
6
12
7
jobs :
13
8
publish-lib-prerelease :
25
20
with :
26
21
fetch-depth : 2
27
22
23
+ # run test-lint
24
+ - name : Test and lint
25
+ uses : ./.github/actions/test-lint
26
+
28
27
# Check for changes in ./packages/litlytics
29
28
- name : Check if changed
30
29
id : changes
Original file line number Diff line number Diff line change 1
1
name : Release litlytics library
2
2
3
3
on :
4
- workflow_run :
5
- # Run after "Test and lint" workflow
6
- workflows : ['Test and lint']
4
+ release :
7
5
types :
8
- - completed # Only when it's completed
6
+ - published # run on new published releases
9
7
10
8
jobs :
11
9
publish-lib :
23
21
with :
24
22
fetch-depth : 2
25
23
24
+ # run test-lint
25
+ - name : Test and lint
26
+ uses : ./.github/actions/test-lint
27
+
26
28
# Check for changes in ./packages/litlytics
27
29
- name : Check if changed
28
30
id : changes
Original file line number Diff line number Diff line change 21
21
- name : Checkout repository
22
22
uses : actions/checkout@v4
23
23
24
- - name : Install bun for deployment
25
- uses : oven-sh/setup-bun@v2
26
- with :
27
- bun-version : latest
28
-
29
- # install deps
30
- - name : Install lib deps
31
- working-directory : ./packages/litlytics
32
- run : bun install --frozen-lockfile
33
- - name : Install app deps
34
- run : bun install --frozen-lockfile
35
-
36
- # lib lint/check/test
37
- - name : Run lib typecheck
38
- working-directory : ./packages/litlytics
39
- run : bun run typecheck
40
-
41
- - name : Run lib tests
42
- working-directory : ./packages/litlytics
43
- run : bun run test:ci
44
-
45
- # main app lint/check/test
46
- - name : Run app eslint
47
- run : bun run lint
48
-
49
- - name : Run app typecheck
50
- run : bun run typecheck
51
-
52
- - name : Run app test
53
- run : bun run test:ci
24
+ - name : Test and lint
25
+ uses : ./.github/actions/test-lint
You can’t perform that action at this time.
0 commit comments