-
Notifications
You must be signed in to change notification settings - Fork 51
160 lines (149 loc) · 5.19 KB
/
build.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Build
on:
- pull_request
env:
IMG_TOOL: docker
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
Test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: ./tools/github-actions/setup-deps
- name: Unit Test
run: |
make test build-ui test-ui
- name: Long Test
run: |
make testlong
- name: Lint Helm
run: |
make helm-pkg helm-lint
- name: Report
if: github.actor == 'linuxsuren'
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r coverage.out
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial console/atest-ui/coverage/clover.xml
bash <(curl -Ls https://coverage.codacy.com/get.sh) final
APITest:
permissions:
pull-requests: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: ./tools/github-actions/setup-deps
- name: API Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make build copy
sudo atest service install
sudo atest service restart
sudo atest service status
# make test-ui-e2e
atest run -p .github/testing/grpc.yaml --request-ignore-error --report github --report-file bin/report.json --report-github-repo linuxsuren/api-testing --report-github-pr ${{ github.event.number }}
sudo atest service status
sudo atest service stop
sudo atest service uninstall
atest convert -p .github/testing/core.yaml --converter jmeter -t sample.jmx
- name: Run JMeter Tests
uses: rbhadti94/[email protected]
with:
testFilePath: sample.jmx
Build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: ./tools/github-actions/setup-deps
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }}
with:
version: '~> v2'
args: release --clean --snapshot
# - name: Operator
# run: cd operator && make build
E2E:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: ./tools/github-actions/setup-deps
- name: Set output
id: vars
run: echo "tag=$(git describe --tags)" >> $GITHUB_OUTPUT
- name: Package Helm
run: |
export APP_VERSION=${{ steps.vars.outputs.tag }}
export HELM_VERSION=${{ steps.vars.outputs.tag }}
if [[ ! "$line" =~ ^v ]]
then
unset APP_VERSION
unset HELM_VERSION
fi
make helm-pkg
- name: Core Image
run: GOPROXY=direct IMG_TOOL=docker TAG=master REGISTRY=ghcr.io make image
- name: Run e2e
env:
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST: ${{ github.event.number }}
run: |
sudo curl -L https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod u+x /usr/local/bin/docker-compose
make test-e2e
- name: Code Generator Test
run: cd e2e/code-generator && ./start.sh
BuildEmbedUI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: ./tools/github-actions/setup-deps
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "npm"
cache-dependency-path: console/atest-ui/package-lock.json
- name: Build
run: |
make build-embed-ui copy
sudo atest service install
sudo atest service restart
- name: Test
run: make test-ui
BuildDesktop:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: ./tools/github-actions/setup-deps
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
# for fixing Error: Cannot find module 'appdmg'
- name: Install Python 3.11.4
uses: actions/setup-python@v4
with:
python-version: '3.11.4'
- name: Build Desktop on Windows
if: runner.os == 'Windows'
env:
BINARY: atest.exe
run: |
make desktop-package desktop-make
- name: Build Desktop
if: runner.os != 'Windows'
run: |
make desktop-package desktop-make desktop-test
- name: Test extension cmd
run: |
./console/atest-desktop/atest extension git