github.heygears.com/openimsdk/tools@v0.0.49/.github/workflows/openimci.yaml (about) 1 # Copyright © 2023 OpenIM open source community. All rights reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 name: OpenIM CI Aotu Build and Install 16 17 on: 18 push: 19 branches: 20 - main 21 - release-* 22 pull_request: 23 branches: 24 - main 25 - release-* 26 27 env: 28 GO_VERSION: "1.22" 29 GOLANGCI_VERSION: "v1.50.1" 30 31 jobs: 32 openim: 33 name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }} 34 runs-on: ${{ matrix.os }} 35 permissions: 36 contents: write 37 pull-requests: write 38 strategy: 39 matrix: 40 go_version: ["1.21","1.22"] 41 os: [ubuntu-latest] 42 steps: 43 - name: Setup 44 uses: actions/checkout@v4 45 46 - name: Set up Go ${{ matrix.go_version }} 47 uses: actions/setup-go@v5 48 with: 49 go-version: ${{ matrix.go_version }} 50 id: go 51 52 - name: Install Task 53 uses: arduino/setup-task@v1 54 with: 55 version: '3.x' # If available, use the latest major version that's compatible 56 repo-token: ${{ secrets.GITHUB_TOKEN }} 57 58 - name: Module Operations 59 run: | 60 sudo make tidy 61 sudo make tools.verify.go-gitlint 62 63 - name: Format Code 64 run: sudo make lint 65 continue-on-error: true 66 67 - name: test 68 run: sudo make test 69 70 - name: Collect and Display Test Coverage 71 id: collect_coverage 72 run: | 73 sudo make cover