Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit e1e3544

Browse files
committed
ci: GitHub workflow updates
- Update CI test code - Tested using `act` but could use more testing
1 parent 8c7fa7c commit e1e3544

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,12 @@ jobs:
2828
run: npm install
2929

3030
- name: Run build
31-
run: npm run build
32-
33-
- name: Pack library
34-
run: npm pack
35-
36-
# test demo
37-
- name: Install demo dependencies
38-
working-directory: ./demo
39-
run: npm install
31+
run: npm run build:lib
4032

4133
- name: Install current angular-datatables to demo
4234
working-directory: ./demo
43-
run: rm -rf node_modules/angular-datatables && npm install --no-save --no-package-lock ../angular-datatables-*.tgz
35+
run: npm run link:lib
4436

4537
- name: Run demo test
4638
working-directory: ./demo
47-
run: npm run test-ci
39+
run: npm run demo:test-ci

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
run: npm install
2020

2121
- name: Run build
22-
run: npm run build
22+
run: npm run build:lib
2323

2424
- name: Publish to NPM packages
2525
# includes a --ignore-scripts command argument to avoid executing npm life cycle scripts during this phase
2626
# for security concerns as scripts could steal NODE_AUTH_TOKEN
27-
run: npm publish --ignore-scripts --access public
27+
run: cd lib && npm publish --ignore-scripts --access public
2828
env:
2929
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3030

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"clean": "rimraf -f lib/**/index.{d.ts,js,js.map,metadata.json} demo/**/*.{d.ts,js,map,metadata.json} bundles schematics/**/*.{d.ts,js,map}",
99
"link:lib": "rimraf node_modules/angular-datatables && linklocal",
1010
"demo:test": "ng test",
11-
"demo:test-ci": "ng test --no-progress",
11+
"demo:test-ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless",
1212
"lib:schematics:build": "tsc -p lib/schematics/tsconfig.json",
1313
"demo:build:prod": "ng build --configuration production --aot --base-href /angular-datatables/",
1414
"version": "npm run build && git add -A",

0 commit comments

Comments
 (0)