16
16
- name : Get sources
17
17
uses : actions/checkout@v3
18
18
19
+ - name : Clone devextreme repo from PR author fork
20
+ continue-on-error : true
21
+ if : github.event_name == 'pull_request'
22
+ run : git clone -b ${{github.event.pull_request.head.ref}} https://github.com/${{github.event.pull_request.user.login}}/devextreme ../devextreme
23
+
24
+ - name : Clone devextreme repo
25
+ run : test -d ../devextreme || git clone -b 23_1 https://github.com/devexpress/devextreme ../devextreme
26
+
19
27
- name : Use Node.js 18
20
28
uses : actions/setup-node@v3
21
29
with :
@@ -25,35 +33,43 @@ jobs:
25
33
with :
26
34
dotnet-version : ' 3.1.x'
27
35
28
- - name : Install npm packages
29
- run : npm i
36
+ - name : Restore devextreme npm cache
37
+ uses : actions/cache@v3
38
+ with :
39
+ path : node_modules
40
+ key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
41
+ restore-keys : ${{ runner.os }}-node-modules
30
42
31
- - name : Run lint
32
- run : npm run lint
43
+ - name : Install packages in devextreme repo
44
+ run : |
45
+ cd ../devextreme
46
+ npm install --no-audit --no-fund
33
47
34
- - name : Restore devextreme
35
- run : npm run restore-devextreme
48
+ - name : Build devextreme repo
49
+ run : |
50
+ cd ../devextreme
51
+ npm run build-dist
36
52
37
53
- name : Link devextreme
38
- run : npm run link-devextreme
54
+ run : |
55
+ cd ../devextreme/artifacts/npm/devextreme
56
+ npm link
39
57
40
- - name : Generate metadata
41
- run : npm run generate-metadata
58
+ - name : Install npm packages and link to devextreme
59
+ run : |
60
+ npm link devextreme --legacy-peer-deps
42
61
43
- - name : Build packages
44
- run : npm run build:packages
62
+ - name : Run lint
63
+ run : npm run lint
45
64
46
- - name : Check generated code
47
- shell : bash
48
- run : |
49
- git add . -N
50
- changes=$(git diff --name-status HEAD -- packages/devextreme-vue/src packages/vue2-strategy/src)
51
- if [ -n "$changes" ]; then
52
- echo "Generated code is outdated. The following files have uncommitted changes:"
53
- echo "$changes";
54
- echo "To update generated code, generate metadata, build packages and commit changes."
55
- exit 1
56
- fi
65
+ - name : Run update integration meta
66
+ run : npm run update-integration-meta
67
+
68
+ - name : Build generator
69
+ run : npm run build -w devextreme-vue-generator
70
+
71
+ - name : Run build
72
+ run : npm run build:packages
57
73
58
74
- name : Run tests with Vue
59
75
run : npm run test
0 commit comments