File tree Expand file tree Collapse file tree 2 files changed +132
-0
lines changed Expand file tree Collapse file tree 2 files changed +132
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run E2E Regression Tests
2
+ on :
3
+ schedule :
4
+ - cron : " 0 0 * * 1-5"
5
+ jobs :
6
+ run_e2e_tests :
7
+ name : Run E2E Tests
8
+ runs-on : ubuntu-latest
9
+ strategy :
10
+ matrix :
11
+ package : ["ct", "bp"]
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v2
15
+ with :
16
+ ref : next
17
+
18
+ - name : Setup node
19
+ uses : actions/setup-node@v2
20
+ with :
21
+ node-version : ' 12'
22
+
23
+ - name : Get cached dependencies
24
+ uses : actions/cache@v2
25
+ with :
26
+ path : |
27
+ ~/.cache/Cypress
28
+ **/node_modules
29
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30
+
31
+ - name : Install dependencies
32
+ run : yarn install
33
+
34
+ - name : Build tools
35
+ run : yarn build:${{ matrix.package }}
36
+
37
+ - name : Run cypress tests
38
+ uses : cypress-io/github-action@v2.8.2
39
+ with :
40
+ start : yarn dev:${{ matrix.package }}
41
+ wait-on : ' http://localhost:3000'
42
+ command : yarn run test:e2e:${{ matrix.package }}:hl
43
+ browser : chrome
44
+ headless : true
45
+ install : false
46
+ env :
47
+ CYPRESS_INCLUDE_TAGS : regression
48
+
49
+ - name : Generate report
50
+ if : ${{ always() }}
51
+ run : yarn test:e2e:${{ matrix.package }}:generate:report
52
+
53
+ - name : Upload report artifact
54
+ uses : actions/upload-artifact@v2
55
+ if : ${{ always() }}
56
+ with :
57
+ name : report
58
+ path : " packages/$${{ matrix.package }}/theme/tests/e2e/report"
59
+ env :
60
+ bp : boilerplate
61
+ ct : commercetools
Original file line number Diff line number Diff line change
1
+ name : Run E2E Tests
2
+ on :
3
+ workflow_dispatch :
4
+ inputs :
5
+ tags_include :
6
+ description : " Include tags"
7
+ required : false
8
+ tags_exclude :
9
+ description : " Exclude tags"
10
+ required : false
11
+ package :
12
+ description : " Package"
13
+ default : " ct"
14
+ required : true
15
+ browser :
16
+ description : " Browser"
17
+ default : " chrome"
18
+ required : true
19
+ jobs :
20
+ run_e2e_tests :
21
+ name : Run E2E Tests
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - name : Checkout code
25
+ uses : actions/checkout@v2
26
+
27
+ - name : Setup node
28
+ uses : actions/setup-node@v2
29
+ with :
30
+ node-version : ' 12'
31
+
32
+ - name : Get cached dependencies
33
+ uses : actions/cache@v2
34
+ with :
35
+ path : |
36
+ ~/.cache/Cypress
37
+ **/node_modules
38
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
39
+
40
+ - name : Install dependencies
41
+ run : yarn install
42
+
43
+ - name : Build tools
44
+ run : yarn build:${{ github.event.inputs.package }}
45
+
46
+ - name : Run cypress tests
47
+ uses : cypress-io/github-action@v2.8.2
48
+ with :
49
+ start : yarn dev:${{ github.event.inputs.package }}
50
+ wait-on : ' http://localhost:3000'
51
+ command : yarn run test:e2e:${{ github.event.inputs.package }}:hl
52
+ browser : ${{ github.event.inputs.browser }}
53
+ headless : true
54
+ install : false
55
+ env :
56
+ CYPRESS_INCLUDE_TAGS : ${{ github.event.inputs.tags_include }}
57
+ CYPRESS_EXCLUDE_TAGS : ${{ github.event.inputs.tags_exclude }}
58
+
59
+ - name : Generate report
60
+ if : ${{ always() }}
61
+ run : yarn test:e2e:${{ github.event.inputs.tags_exclude }}:generate:report
62
+
63
+ - name : Upload report artifact
64
+ uses : actions/upload-artifact@v2
65
+ if : ${{ always() }}
66
+ with :
67
+ name : report
68
+ path : " packages/$${{ github.event.inputs.package }}/theme/tests/e2e/report"
69
+ env :
70
+ bp : boilerplate
71
+ ct : commercetools
You can’t perform that action at this time.
0 commit comments