Browse Source

fix(main): fix cicd actions

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
tags/v0.1.0
Xinwei Xiong(cubxxw-openim) 3 years ago
parent
commit
562c4f0cf1
9 changed files with 119 additions and 34 deletions
  1. +14
    -0
      .github/weekly-digest.yml
  2. +14
    -0
      .github/workflows/issue-robot.yml
  3. +0
    -31
      .github/workflows/issue-translator-robot.yml
  4. +1
    -1
      .github/workflows/project-progress.yml
  5. +21
    -2
      Makefile
  6. +23
    -0
      scripts/release.mk
  7. +14
    -0
      server/internal/middleware/frequency_control.go
  8. +16
    -0
      web/.eslintrc.js
  9. +16
    -0
      web/.prettierrc.js

+ 14
- 0
.github/weekly-digest.yml View File

@@ -1,3 +1,17 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

publishDay: sun publishDay: sun
canPublishIssues: true canPublishIssues: true
canPublishPullRequests: true canPublishPullRequests: true


+ 14
- 0
.github/workflows/issue-robot.yml View File

@@ -1,3 +1,17 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'issue translator' name: 'issue translator'
on: on:
issue_comment: issue_comment:


+ 0
- 31
.github/workflows/issue-translator-robot.yml View File

@@ -1,31 +0,0 @@
# Copyright © 2023 OpenIMSDK open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'issue translator'
on:
issue_comment:
types: [created]
issues:
types: [opened]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: usthe/issues-translate-action@v2.7
with:
# it is not necessary to decide whether you need to modify the issue header content
IS_MODIFY_TITLE: true
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
# Required, input your bot github token

+ 1
- 1
.github/workflows/project-progress.yml View File

@@ -31,6 +31,6 @@ jobs:
steps: steps:
- uses: alex-page/github-project-automation-plus@v0.8.3 - uses: alex-page/github-project-automation-plus@v0.8.3
with: with:
project: OpenIM 2023 Sprint 🔥
project: OpenKF
column: In Progress column: In Progress
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }} repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}

+ 21
- 2
Makefile View File

@@ -158,7 +158,7 @@ EXCLUDE_TESTS=github.com/OpenIMSDK/OpenKF/test


## all: Build all the necessary targets. ## all: Build all the necessary targets.
.PHONY: all .PHONY: all
all: copyright-verify build # tidy lint cover
all: copyright-verify tidy lint cover build


## build: Build binaries by default. ## build: Build binaries by default.
.PHONY: build .PHONY: build
@@ -247,7 +247,7 @@ test:
## cover: Run unit test with coverage. ## cover: Run unit test with coverage.
.PHONY: cover .PHONY: cover
cover: test.junit-report cover: test.junit-report
@$(GO) tool cover -func=$(TMP_DIR)/coverage.out | \
@cd $(SERVER_DIR) && $(GO) tool cover -func=$(TMP_DIR)/coverage.out | \
awk -v target=$(COVERAGE) -f $(ROOT_DIR)/scripts/coverage.awk awk -v target=$(COVERAGE) -f $(ROOT_DIR)/scripts/coverage.awk


## docker-build: Build docker image with the manager. ## docker-build: Build docker image with the manager.
@@ -290,6 +290,25 @@ swagger: tools.verify.swagger
serve-swagger: tools.verify.swagger serve-swagger: tools.verify.swagger
@$(TOOLS_DIR)/swagger serve -F=redoc --no-open --port 36666 $(ROOT_DIR)/server/docs/swagger.yaml @$(TOOLS_DIR)/swagger serve -F=redoc --no-open --port 36666 $(ROOT_DIR)/server/docs/swagger.yaml


## release: release the project
.PHONY: release
release: release.verify release.ensure-tag
@scripts/release.sh

## release.verify: Check if a tool is installed and install it
.PHONY: release.verify
release.verify: tools.verify.git-chglog tools.verify.github-release tools.verify.coscmd tools.verify.coscli

## release.tag: release the project
.PHONY: release.tag
release.tag: tools.verify.gsemver release.ensure-tag
@git push origin `git describe --tags --abbrev=0`

## release.ensure-tag: ensure tag
.PHONY: release.ensure-tag
release.ensure-tag: tools.verify.gsemver
@scripts/ensure_tag.sh

## clean: Clean all builds. ## clean: Clean all builds.
.PHONY: clean .PHONY: clean
clean: clean:


+ 23
- 0
scripts/release.mk View File

@@ -0,0 +1,23 @@
# Build a OpenIM release. This will build the binaries, create the Docker
# images and other build artifacts.

set -o errexit
set -o nounset
set -o pipefail

OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${OPENIM_ROOT}/scripts/common.sh"
source "${OPENIM_ROOT}/scripts/lib/release.sh"

OPENIM_RELEASE_RUN_TESTS=${OPENIM_RELEASE_RUN_TESTS-y}

openim::golang::setup_env
openim::build::verify_prereqs
openim::release::verify_prereqs
#openim::build::build_image
openim::build::build_command
openim::release::package_tarballs
openim::release::updload_tarballs
git push origin ${VERSION}
#openim::release::github_release
#openim::release::generate_changelog

+ 14
- 0
server/internal/middleware/frequency_control.go View File

@@ -1,3 +1,17 @@
// Copyright © 2023 OpenIM open source community. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package middleware package middleware


import ( import (


+ 16
- 0
web/.eslintrc.js View File

@@ -1,3 +1,19 @@
/**
* Copyright © 2023 OpenIM open source community. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = { module.exports = {
env: { env: {
browser: true, browser: true,


+ 16
- 0
web/.prettierrc.js View File

@@ -1,3 +1,19 @@
/**
* Copyright © 2023 OpenIM open source community. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = { module.exports = {
printWidth: 80, printWidth: 80,
tabWidth: 4, tabWidth: 4,


Loading…
Cancel
Save