@@ -2,67 +2,17 @@ name: tool-ci
22on :
33 push :
44 branches :
5- - ' **'
6- tags :
7- - ' '
5+ - main
6+ pull_request :
7+ branches :
8+ - dev
89jobs :
9- scan :
10- runs-on : self-hosted
11- steps :
12- - name : Checkout Code
13- uses : actions/checkout@v3
14- with :
15- fetch-depth : 0
16- - name : Scan Code
17- uses : sonarsource/sonarqube-scan-action@master
18- env :
19- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
20- SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
21- with :
22- args : >
23- -Dsonar.projectKey=dds-tool
24- test_on_windows_2019 :
25- if : github.repository_owner == 'IDEA-Research'
26- needs : scan
27- runs-on : windows-2019
28- steps :
29- - name : Checkout Code
30- uses : actions/checkout@v3
31- with :
32- fetch-depth : 0
33- - name : Setup Python 3.10
34- uses : actions/setup-python@v4
35- with :
36- python-version : ' 3.10'
37- cache : ' pip'
38- cache-dependency-path : ' requirements-dev.txt'
39- - name : Run Test
40- run : |
41- pip install -r requirements-dev.txt
42- pytest --cov=deepdataspace -s --cov-report=xml
43- test_on_windows_2022 :
44- if : github.repository_owner == 'IDEA-Research'
45- needs : scan
46- runs-on : windows-2022
47- steps :
48- - name : Checkout Code
49- uses : actions/checkout@v3
50- with :
51- fetch-depth : 0
52- - name : Setup Python 3.10
53- uses : actions/setup-python@v4
54- with :
55- python-version : ' 3.10'
56- cache : ' pip'
57- cache-dependency-path : ' requirements-dev.txt'
58- - name : Run Test
59- run : |
60- pip install -r requirements-dev.txt
61- pytest --cov=deepdataspace -s --cov-report=xml
62- test_on_macos_12 :
63- if : github.repository_owner == 'IDEA-Research'
64- needs : scan
65- runs-on : macos-12
10+ test_python :
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ os : [windows-2022, macos-12, ubuntu-22.04]
6616 steps :
6717 - name : Checkout Code
6818 uses : actions/checkout@v3
@@ -71,44 +21,34 @@ jobs:
7121 - name : Setup Python 3.10
7222 uses : actions/setup-python@v4
7323 with :
74- python-version : ' 3.10'
75- cache : ' pip'
76- cache-dependency-path : ' requirements-dev.txt'
77- - name : Run Test
78- run : |
79- pip install -r requirements-dev.txt
80- pytest --cov=deepdataspace -s --cov-report=xml
81- test_on_ubuntu_2204 :
82- if : github.repository_owner == 'IDEA-Research'
83- needs : [test_on_windows_2019, test_on_windows_2022, test_on_macos_12 ]
84- runs-on : ubuntu-22.04
85- steps :
86- - name : Checkout Code
87- uses : actions/checkout@v3
88- with :
89- fetch-depth : 0
90- - name : Setup Python 3.10
91- uses : actions/setup-python@v4
92- with :
93- python-version : ' 3.10'
94- cache : ' pip'
95- cache-dependency-path : ' requirements-dev.txt'
24+ python-version : " 3.10"
25+ cache : " pip"
26+ cache-dependency-path : " requirements-dev.txt"
9627 - name : Run Test
9728 run : |
9829 pip install -r requirements-dev.txt
9930 pytest --cov=deepdataspace -s --cov-report=xml
10031 - name : Upload Test Report
10132 uses : codecov/codecov-action@v3
33+ if : matrix.os == 'ubuntu-22.04'
10234 with :
10335 token : ${{ secrets.CODECOV_TOKEN }}
10436 fail_ci_if_error : true
10537 verbose : true
10638 flags : backend
10739 test_frontend :
108- if : github.repository_owner == 'IDEA-Research'
109- runs-on : self-hosted
40+ runs-on : ubuntu-22.04
41+ env :
42+ TZ : Asia/Shanghai
11043 steps :
111- - uses : actions/checkout@v1
44+ - uses : actions/checkout@v3
45+ - name : Setup Node.js
46+ uses : actions/setup-node@v4
47+ with :
48+ node-version : " 20"
49+ - name : Setup pnpm
50+ uses : pnpm/action-setup@v4
51+ with : {}
11252 - name : Install requirements
11353 run : pnpm install --frozen-lockfile
11454 - name : Run pnpm audit
0 commit comments