mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
feat: add openim e2e test
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
parent
238969e78c
commit
7be38d332f
53
.github/workflows/api-test.yml
vendored
53
.github/workflows/api-test.yml
vendored
@ -22,4 +22,55 @@ env:
|
|||||||
GO_VERSION: "1.19"
|
GO_VERSION: "1.19"
|
||||||
GOLANGCI_VERSION: "v1.50.1"
|
GOLANGCI_VERSION: "v1.50.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
execute-linux-systemd-scripts:
|
||||||
|
name: Execute OpenIM script on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
environment:
|
||||||
|
name: openim
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go_version: ["1.20"]
|
||||||
|
os: ["ubuntu-latest"]
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Go ${{ matrix.go_version }}
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go_version }}
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Install Task
|
||||||
|
uses: arduino/setup-task@v1
|
||||||
|
with:
|
||||||
|
version: '3.x' # If available, use the latest major version that's compatible
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Docker Operations
|
||||||
|
run: |
|
||||||
|
curl -o docker-compose.yml https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml
|
||||||
|
sudo docker compose up -d
|
||||||
|
sudo sleep 60
|
||||||
|
|
||||||
|
- name: Module Operations
|
||||||
|
run: |
|
||||||
|
sudo make tidy
|
||||||
|
sudo make tools.verify.go-gitlint
|
||||||
|
|
||||||
|
- name: Build, Start, Check Services and Print Logs
|
||||||
|
run: |
|
||||||
|
sudo ./scripts/install/install.sh -i && \
|
||||||
|
sudo ./scripts/install/install.sh -s && \
|
||||||
|
(echo "An error occurred, printing logs:" && sudo cat ./_output/logs/* 2>/dev/null)
|
||||||
|
|
||||||
|
- name: Run Test
|
||||||
|
run: |
|
||||||
|
sudo make test-api && \
|
||||||
|
(echo "An error occurred, printing logs:" && sudo cat ./_output/logs/* 2>/dev/null)
|
||||||
|
|
||||||
|
- name: Stop Services
|
||||||
|
run: |
|
||||||
|
sudo ./scripts/install/install.sh -u && \
|
||||||
|
(echo "An error occurred, printing logs:" && sudo cat ./_output/logs/* 2>/dev/null)
|
Loading…
x
Reference in New Issue
Block a user