File tree Expand file tree Collapse file tree 3 files changed +76
-3
lines changed Expand file tree Collapse file tree 3 files changed +76
-3
lines changed Original file line number Diff line number Diff line change
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name : CI
4
+
5
+ # Controls when the action will run. Triggers the workflow on push or pull request
6
+ # events but only for the master branch
7
+ on :
8
+ push :
9
+ branches : [ master ]
10
+ pull_request :
11
+ branches : [ master ]
12
+
13
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
+ jobs :
15
+ # This workflow contains a single job called "build"
16
+ build :
17
+ # The type of runner that the job will run on
18
+ runs-on : ubuntu-latest
19
+
20
+ # Steps represent a sequence of tasks that will be executed as part of the job
21
+ steps :
22
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23
+ - uses : actions/checkout@v2
24
+
25
+ - name : Get yarn cache directory path
26
+ id : yarn-cache-dir-path
27
+ run : echo "::set-output name=dir::$(yarn cache dir)"
28
+
29
+ - name : Yarn cache
30
+ uses : actions/cache@v1
31
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
32
+ with :
33
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
34
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35
+ restore-keys : |
36
+ ${{ runner.os }}-yarn-
37
+
38
+ - name : Dependencies cache
39
+ uses : actions/cache@v2
40
+ with :
41
+ path : |
42
+ node_modules
43
+ **/node_modules
44
+ key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
45
+
46
+ - name : Cypress cache
47
+ uses : actions/cache@v1
48
+ with :
49
+ path : /home/runner/.cache/Cypress
50
+ key : ${{ runner.os }}-Cypress-v1
51
+
52
+ - name : Install
53
+ run : yarn --frozen-lockfile
54
+
55
+ # Runs a single command using the runners shell
56
+ - name : Lint
57
+ run : |
58
+ yarn run lint
59
+
60
+ - name : Build package
61
+ run : |
62
+ yarn run build
63
+
64
+ # Runs a set of commands using the runners shell
65
+ - name : E2E tests
66
+ run : |
67
+ yarn run test:e2e
68
+
69
+ - uses : actions/upload-artifact@v1
70
+ with :
71
+ name : Cypress Videos
72
+ path : cypress/videos
Original file line number Diff line number Diff line change 16
16
* @type {Cypress.PluginConfig }
17
17
*/
18
18
module . exports = ( on , config ) => {
19
- // `on` is used to hook into various events Cypress emits
20
- // `config` is the resolved Cypress config
19
+ // `on` is used to hook into various events Cypress emits
20
+ // `config` is the resolved Cypress config
21
21
}
Original file line number Diff line number Diff line change 21
21
"build:browser" : " rollup --config build/rollup.config.browser.js" ,
22
22
"build:es" : " rollup --config build/rollup.config.es.js" ,
23
23
"build:umd" : " rollup --config build/rollup.config.umd.js" ,
24
- "prepublishOnly" : " npm run build && npm run test" ,
24
+ "prepublishOnly" : " npm run build && npm run lint && npm run test" ,
25
+ "lint" : " eslint . --ext js" ,
25
26
"serve" : " serve -p 8080" ,
26
27
"test" : " start-server-and-test serve 8080 test:e2e" ,
27
28
"test:e2e:open" : " cypress open" ,
You can’t perform that action at this time.
0 commit comments