@@ -11,7 +11,20 @@ workflows:
11
11
- cypress/install :
12
12
name : Install
13
13
executor : cypress/base-12
14
- build : npm run build
14
+ # creates files in "dist" folder
15
+ build : |
16
+ npm run build
17
+ echo ""
18
+ echo "Build package archive 📦"
19
+ echo ""
20
+ # first show the contents to be packed
21
+ npm pack --dry
22
+ echo ""
23
+ echo "packing ..."
24
+ echo ""
25
+ npm pack
26
+ echo ""
27
+ ls -la
15
28
post-steps :
16
29
- run :
17
30
name : Show info 📺
@@ -40,6 +53,41 @@ workflows:
40
53
echo "Test files for this machine are $TESTFILES"
41
54
npx cypress run --spec $TESTFILES
42
55
56
+ - cypress/run :
57
+ name : Example CLI
58
+ executor : cypress/base-12
59
+ requires :
60
+ - Install
61
+ install-command : npm install
62
+ verify-command : echo 'Already verified'
63
+ no-workspace : true
64
+ working_directory : examples/cli
65
+ command : |
66
+ echo "🦶🏻 Scaffolding component tests"
67
+ echo ""
68
+ # scaffolds Babel + Webpack combo
69
+ npx --package @vue/cli vue add cypress-experimental
70
+ echo ""
71
+ echo "🦶🏻 test scaffolded project, should work"
72
+ echo ""
73
+ DEBUG=cypress-vue-unit-test npx cypress run --spec 'tests/components/**/*.js'
74
+ # let's inspect the scaffolded app
75
+ ls -la
76
+ echo ""
77
+ echo "🦶🏻 install the current cypress-vue-unit-test"
78
+ echo ""
79
+ npm install ../../cypress-vue-unit-test-0.0.0-development.tgz
80
+ echo ""
81
+ echo "🦶🏻 run component tests"
82
+ echo ""
83
+ DEBUG=cypress-vue-unit-test npx cypress run --spec 'tests/components/**/*.js'
84
+ echo ""
85
+ echo "🦶🏻 look at the generated files, should have coverage"
86
+ # (after updating cypress-experimental)
87
+ echo ""
88
+ ls -la
89
+ store_artifacts : true
90
+
43
91
# this job attaches the workspace left by the install job
44
92
# so it is ready to run Cypress tests
45
93
# only we will run semantic release script instead
@@ -55,6 +103,7 @@ workflows:
55
103
requires :
56
104
- Install
57
105
- Test
106
+ - Example CLI
58
107
install-command : echo 'Already installed'
59
108
verify-command : echo 'Already verified'
60
109
no-workspace : true
0 commit comments