feat: add scripts test and format

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/921/head
Xinwei Xiong(cubxxw-openim) 2 years ago
parent 6346b98115
commit e2629f43ab
No known key found for this signature in database
GPG Key ID: 1BAD6F395338EFDE

@ -12,5 +12,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# name: OpenIM e2e Test
name: e2e
on:
workflow_dispatch:
pull_request:
push:
schedule:
# run e2e test every 4 hours
- cron: 0 */4 * * *
jobs:
build:
name: Test
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: 1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Create e2e test
run: |
echo "...test e2e"

@ -26,13 +26,13 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
with:
# Require: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.54
version: v1.53
# Optional: working directory, useful for monorepos
# working-directory: server

@ -58,7 +58,6 @@ run:
skip-files:
- ".*\\.my\\.go$"
- _test.go
- ".*\\.pb\\.go"
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
@ -296,7 +295,7 @@ linters-settings:
simplify: true
gofumpt:
# Select the Go version to target. The default is `1.20`.
# Select the Go version to target. The default is `1.18`.
lang-version: "1.20"
# Choose whether or not to use the extra rules that are disabled
@ -584,13 +583,13 @@ linters-settings:
severity: warning
staticcheck:
# Select the Go version to target. The default is '1.13'.
go: "1.20"
go: "1.16"
# https://staticcheck.io/docs/options#checks
checks: [ "all" ]
stylecheck:
# Select the Go version to target. The default is '1.13'.
go: "1.20"
go: "1.16"
# https://staticcheck.io/docs/options#checks
checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]

Loading…
Cancel
Save