1010 runs-on : ubuntu-latest
1111 strategy :
1212 matrix :
13- node-version : [16.x, 18.x, 20.x]
13+ node-version : [18.x, 20.x]
1414 # See supported Node.js release schedule at
1515 # https://nodejs.org/en/about/releases/
1616 defaults :
3535 uses : codecov/codecov-action@v4
3636 with :
3737 fail_ci_if_error : true
38- directory : coverage/
38+ directory : chartlets.js/packages/lib/ coverage/
3939 flags : frontend
4040 verbose : true
4141 token : ${{ secrets.CODECOV_TOKEN }}
@@ -44,35 +44,52 @@ jobs:
4444
4545 npm-tests-demo :
4646 runs-on : ubuntu-latest
47- strategy :
48- matrix :
49- node-version : [16.x, 18.x, 20.x]
50- # See supported Node.js release schedule at
51- # https://nodejs.org/en/about/releases/
52- defaults :
53- run :
54- working-directory : chartlets.js/packages/demo
55-
5647 steps :
57- - uses : actions/checkout@v3
58- - name : Use Node.js ${{ matrix.node-version }}
59- uses : actions/setup-node@v3
48+ - name : git-checkout chartlets
49+ uses : actions/checkout@v4
50+
51+ - name : Set up Node.js
52+ uses : actions/setup-node@v4
6053 with :
61- node-version : ${{ matrix.node-version }}
62- cache : ' npm'
63- cache-dependency-path : chartlets.js/package-lock.json
64-
65- - run : npm ci
66- - run : npm run lint
67- - run : npm run build
54+ node-version : ' 20.x'
55+
56+ - name : Install common dependencies
57+ run : |
58+ cd chartlets.js
59+ npm install
60+
61+ - name : Lib lint
62+ run : |
63+ cd chartlets.js/packages/lib
64+ npm run lint
65+
66+ - name : Lib tests
67+ run : |
68+ cd chartlets.js/packages/lib
69+ npm run test
70+
71+ - name : Lib build
72+ run : |
73+ cd chartlets.js/packages/lib
74+ npm run build
75+
76+ - name : Demo lint
77+ run : |
78+ cd chartlets.js/packages/demo
79+ npm run lint
80+
81+ - name : Demo build
82+ run : |
83+ cd chartlets.js/packages/demo
84+ npm run build
6885
6986 npm-deploy :
7087 name : Publish TS-React Package to npmjs
7188 runs-on : ubuntu-latest
7289 needs : [npm-tests-lib, npm-tests-demo]
7390 defaults :
7491 run :
75- working-directory : chartlets.js/packages/lib
92+ working-directory : chartlets.js
7693
7794 steps :
7895 - uses : actions/checkout@v4
@@ -85,8 +102,11 @@ jobs:
85102 cache : ' npm'
86103 cache-dependency-path : chartlets.js/package-lock.json
87104
88- - run : npm ci
89- - run : npm run build
90- - run : npm publish --access public
105+ - name : Install dependencies, build, and publish (packages/lib)
106+ run : |
107+ cd packages/lib
108+ npm ci
109+ npm run build
110+ npm publish --access public
91111 env :
92112 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments