-
Notifications
You must be signed in to change notification settings - Fork 19
127 lines (127 loc) · 3.64 KB
/
tool-ci.yaml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: tool-ci
on:
push:
branches:
- '**'
tags:
- ''
jobs:
scan:
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Scan Code
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=dds-tool
test_on_windows_2019:
if: github.repository_owner == 'IDEA-Research'
needs: scan
runs-on: windows-2019
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
test_on_windows_2022:
if: github.repository_owner == 'IDEA-Research'
needs: scan
runs-on: windows-2022
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
test_on_macos_12:
if: github.repository_owner == 'IDEA-Research'
needs: scan
runs-on: macos-12
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
test_on_ubuntu_2204:
if: github.repository_owner == 'IDEA-Research'
needs: [test_on_windows_2019, test_on_windows_2022, test_on_macos_12 ]
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
- name: Run Test
run: |
pip install -r requirements-dev.txt
pytest --cov=deepdataspace -s --cov-report=xml
- name: Upload Test Report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
flags: backend
test_frontend:
if: github.repository_owner == 'IDEA-Research'
runs-on: self-hosted
steps:
- uses: actions/checkout@v1
- name: Install requirements
run: pnpm install --frozen-lockfile
- name: Run pnpm audit
run: pnpm audit --registry=https://registry.npmjs.org
continue-on-error: true
- name: Run dev:build to add .umi files
run: pnpm run dev:build
- name: Run tests and collect coverage
run: pnpm run test
- name: Upload Test Report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
flags: frontend