chore: update version to v1.8.0 and bump dependencies #87
Workflow file for this run
This file contains hidden or 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
| # Copyright 2025 The ChaosBlade Authors | |
| # | |
| # 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: CI | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| env: | |
| GO_VERSION: '1.25' | |
| jobs: | |
| test: | |
| name: Test on Linux AMD64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Run code style and import order verification | |
| run: make verify | |
| - name: Check License Header | |
| uses: korandoru/hawkeye@v6 | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Run vet | |
| run: go vet ./... | |
| - name: Run tests | |
| run: make test | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.txt | |
| flags: unittests | |
| name: codecov-umbrella | |
| # 多平台CLI编译 | |
| build-multi-platform: | |
| name: Build CLI - ${{ matrix.os }}-${{ matrix.arch }} | |
| runs-on: ubuntu-latest | |
| needs: test | |
| strategy: | |
| matrix: | |
| include: | |
| - os: linux | |
| arch: amd64 | |
| target: linux_amd64 | |
| - os: linux | |
| arch: arm64 | |
| target: linux_arm64 | |
| - os: darwin | |
| arch: amd64 | |
| target: darwin_amd64 | |
| - os: darwin | |
| arch: arm64 | |
| target: darwin_arm64 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install musl-gcc for static linking (Linux only) | |
| if: matrix.os == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y musl-tools | |
| - name: Build CLI for ${{ matrix.target }} | |
| run: make ${{ matrix.target }} MODULES=cli | |
| - name: Verify file format and structure | |
| run: | | |
| cd target/chaosblade-*-${{ matrix.target }} | |
| # 校验文件格式 | |
| echo "Verifying file structure for ${{ matrix.target }}..." | |
| ls -la | |
| echo "Checking blade binary..." | |
| file ./blade | |