Update .env #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Deployment Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- "**/*.md" | |
workflow_dispatch: | |
jobs: | |
docker-build: | |
name: Test docker deployment on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
pull-requests: write | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v3 | |
- name: Get IP Address | |
id: get-ip | |
run: echo "OPENIM_IP=$(curl -s ifconfig.me)" >> $GITHUB_ENV | |
- name: Get OpenIM Data DIR | |
id: get-dir | |
run: echo "DATA_DIR=$(pwd)" >> $GITHUB_ENV | |
- name: Run Docker Compose | |
run: | | |
docker compose up -d | |
docker compose ps | |
- name: Test OpenIM Server | |
run: | | |
docker logs openim-server | |
- name: Test OpenIM chat | |
run: | | |
docker logs openim-chat | |
- name: stop docker compose | |
run: | | |
docker compose down | |
go-test: | |
name: Benchmark Test with go ${{ matrix.go_version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
env: | |
SDK_DIR: openim-sdk-core | |
CONFIG_PATH: docker-compose.yaml | |
# pull-requests: write | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
go_version: [ "1.22.x" ] | |
steps: | |
- name: Checkout Docker repository | |
uses: actions/checkout@v4 | |
- name: Checkout SDK repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 'openimsdk/openim-sdk-core' | |
path: ${{ env.SDK_DIR }} | |
- name: Set up Go ${{ matrix.go_version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go_version }} | |
- name: Install yq | |
run: | | |
sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/bin/yq | |
sudo chmod +x /usr/bin/yq | |
- name: Modify Server Configuration | |
run: | | |
yq eval '.services.openim-server.environment += ["IMENV_NOTIFICATION_GROUPCREATED_UNREADCOUNT=TRUE"]' -i ${{ env.CONFIG_PATH }} | |
yq eval '.services.openim-server.environment += ["IMENV_NOTIFICATION_FRIENDAPPLICATIONAPPROVED_UNREADCOUNT=TRUE"]' -i ${{ env.CONFIG_PATH }} | |
- name: Start Server Services | |
run: | | |
docker compose up -d | |
- name: Build test SDK core | |
run: | | |
cd ${{ env.SDK_DIR }} | |
go mod tidy | |
cd integration_test | |
mkdir data | |
go run main.go -lgr 0.8 -imf -crg -ckgn -ckcon -sem -ckmsn -u 20 -su 5 -lg 2 -cg 2 -cgm 3 -sm 10 -gm 10 -reg | |