Skip to content

Commit 55f3c22

Browse files
committed
rancher/cypress check cypress build errors
Signed-off-by: Francesco Torchia <[email protected]>
1 parent c11800e commit 55f3c22

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

.github/workflows/test.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,18 @@ jobs:
324324
- name: Check e2e tags
325325
run: |
326326
./scripts/check-e2e-tests-for-tags
327+
328+
check-cypress-build:
329+
runs-on: ubuntu-latest
330+
steps:
331+
- uses: actions/checkout@v6
332+
with:
333+
fetch-depth: 1
334+
- uses: actions/setup-node@v6
335+
with:
336+
node-version-file: '.nvmrc'
337+
- name: Verify Cypress build
338+
working-directory: ./cypress
339+
run: |
340+
yarn install --frozen-lockfile
341+
yarn build-pkg --verify

cypress/scripts/build.sh

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
set -e
3+
set -o pipefail
24

35
# Build script for @rancher/cypress package
46
# Run this script from the cypress/ directory
@@ -69,9 +71,18 @@ cp globals.d.ts dist/
6971
cp -r bin dist/
7072
cp -r template dist/
7173

72-
echo "Package built successfully in dist/ directory"
73-
echo "To test with yarn link:"
74-
echo " cd dist"
75-
echo " yarn link"
76-
echo "Then in your other project:"
77-
echo " yarn link '@rancher/cypress'"
74+
if [ "$1" == "--verify" ]; then
75+
echo ""
76+
echo "Package build verified"
77+
echo ""
78+
else
79+
echo "Package built successfully in dist/ directory"
80+
echo ""
81+
echo "To test with yarn link:"
82+
echo " cd dist"
83+
echo " yarn install && yarn link"
84+
echo ""
85+
echo "Then in your other project:"
86+
echo " yarn link '@rancher/cypress'"
87+
echo ""
88+
fi

cypress/tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"sourceMap": true,
1313
"emitDeclarationOnly": false,
1414
"skipLibCheck": true,
15-
"noEmitOnError": false
15+
"noEmitOnError": true
1616
}
1717
}

0 commit comments

Comments
 (0)