-
Notifications
You must be signed in to change notification settings - Fork 68
80 lines (63 loc) · 1.99 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Tests
on:
pull_request:
push:
branches:
- master
- '[12][0-9].[12]'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Get sources
uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18.16.1'
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
- name: Install npm packages
run: npm i
- name: Run lint
run: npm run lint
- name: Restore devextreme
run: npm run restore-devextreme
- name: Build devextreme repo
working-directory: devextreme/packages/devextreme
run: npm run build-npm-devextreme
- name: Pack DevExtreme
working-directory: devextreme/packages/devextreme/artifacts/npm/devextreme
run: |
npm pack
mv devextreme*.tgz devextreme.tgz
- name: Install devextreme package
run: |
npm i --save-dev ./devextreme/packages/devextreme/artifacts/npm/devextreme/devextreme.tgz --workspace=devextreme-vue --workspace=devextreme-vue2-strategy --no-audit --no-fund
- name: Generate metadata
run: npm run generate-metadata
- name: Build packages
run: npm run build:packages
- name: Check generated code
shell: bash
run: |
git add . -N
changes=$(git diff --name-status HEAD -- packages/devextreme-vue/src packages/vue2-strategy/src)
if [ -n "$changes" ]; then
echo "Generated code is outdated. The following files have uncommitted changes:"
echo "$changes";
echo "To update generated code, generate metadata, build packages and commit changes."
exit 1
fi
- name: Run tests with Vue
run: npm run test
- name: Check packing
run: npm run pack
- name: Archive internal-tools artifacts
uses: actions/upload-artifact@v3
with:
name: internal-tools-artifacts
path: artifacts/internal-tools/
retention-days: 7