Skip to content

Commit a7c702a

Browse files
committed
ci: add build validation step
1 parent 58f5c94 commit a7c702a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/setup-node-and-test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,16 @@ jobs:
4343
- name: install node_modules (cache miss)
4444
if: steps.cache-node_modules.outputs.cache-hit != 'true'
4545
run: npm i
46-
- name: typecheck (cache hit, as running `npm i` on a cache miss will automatically run the `prepare` script, which builds and typechecks)
46+
- name: typecheck (on cache hit, as running `npm i` on a cache miss will automatically run the `prepare` script, which builds and typechecks)
4747
if: steps.cache-node_modules.outputs.cache-hit == 'true'
4848
run: npm run build
49+
- name: validate build
50+
run: |
51+
FILE=lib/index.js
52+
FILE2=lib/index.d.ts
53+
if [ -f $FILE ] && [ -f $FILE2 ]; then echo "Files exist"
54+
else echo "Files do not exist" && exit 1
55+
fi
4956
- name: lint
5057
run: npm run lint
5158
- name: test

0 commit comments

Comments
 (0)