File tree 1 file changed +54
-0
lines changed
1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and test Simple Sample TypeScript
2
+
3
+ on :
4
+ # run it on push to the default repository branch
5
+ push :
6
+ branches : [main]
7
+ paths :
8
+ - " samples/simple-ts/**"
9
+ - " ./.github/workflows/build_and_test_sample_ts.yml"
10
+
11
+ # run it during pull request
12
+ pull_request :
13
+ paths :
14
+ - " samples/simple-ts/**"
15
+ - " ./.github/workflows/build_and_test_sample_ts.yml"
16
+
17
+ # Allows you to run this workflow manually from the Actions tab
18
+ workflow_dispatch :
19
+
20
+ defaults :
21
+ run :
22
+ working-directory : samples/simple-ts
23
+
24
+ jobs :
25
+ build-and-test-code :
26
+ name : Build sample code
27
+ # use system defined below in the tests matrix
28
+ runs-on : ubuntu-latest
29
+
30
+ steps :
31
+ - name : Check Out Repo
32
+ uses : actions/checkout@v4
33
+
34
+ - name : Use Node.js
35
+ uses : actions/setup-node@v4
36
+ with :
37
+ node-version-file : ./samples/simple-ts/.nvmrc
38
+ cache : " npm"
39
+ cache-dependency-path : " ./samples/simple-ts/package-lock.json"
40
+
41
+ - name : Install dependencies
42
+ run : npm ci
43
+
44
+ - name : Build TS
45
+ run : npm run build:ts
46
+
47
+ - name : Run linting (ESlint and Prettier)
48
+ run : npm run lint
49
+
50
+ - name : Build
51
+ run : npm run build
52
+
53
+ - name : Test
54
+ run : npm run test
You can’t perform that action at this time.
0 commit comments