Merge pull request #4563 from ChengyuZhu6/manifest #332
  
    
      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
    
  
  
    
  | name: tigron | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release/**' | |
| pull_request: | |
| paths: 'mod/tigron/**' | |
| env: | |
| GO_VERSION: "1.25" | |
| GOTOOLCHAIN: local | |
| jobs: | |
| lint: | |
| timeout-minutes: 15 | |
| name: "${{ matrix.goos }} ${{ matrix.runner }} | go ${{ matrix.canary }}" | |
| runs-on: ${{ matrix.runner }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| - runner: macos-15 | |
| - runner: windows-2022 | |
| - runner: ubuntu-24.04 | |
| goos: freebsd | |
| - runner: ubuntu-24.04 | |
| canary: go-canary | |
| steps: | |
| - name: "Checkout project" | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 100 | |
| - if: ${{ matrix.canary }} | |
| name: "Init (canary): retrieve GO_VERSION" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)" | |
| printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV" | |
| [ "$latest_go" != "" ] || \ | |
| echo "::warning title=No canary go::There is currently no canary go version to test. Steps will not run." | |
| - if: ${{ env.GO_VERSION != '' }} | |
| name: "Install go" | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| check-latest: true | |
| - if: ${{ env.GO_VERSION != '' }} | |
| name: "Install tools" | |
| run: | | |
| cd mod/tigron | |
| echo "::group:: make install-dev-tools" | |
| make install-dev-tools | |
| if [ "$RUNNER_OS" == macOS ]; then | |
| brew install yamllint shellcheck | |
| fi | |
| echo "::endgroup::" | |
| - if: ${{ env.GO_VERSION != '' && matrix.goos == '' }} | |
| name: "lint" | |
| env: | |
| NO_COLOR: true | |
| run: | | |
| if [ "$RUNNER_OS" == Linux ]; then | |
| echo "::group:: lint" | |
| cd mod/tigron | |
| export LINT_COMMIT_RANGE="$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})" | |
| make lint | |
| echo "::endgroup::" | |
| else | |
| echo "Lint is disabled on $RUNNER_OS" | |
| fi | |
| - if: ${{ env.GO_VERSION != '' }} | |
| name: "test-unit" | |
| run: | | |
| echo "::group:: unit test" | |
| cd mod/tigron | |
| make test-unit | |
| echo "::endgroup::" | |
| - if: ${{ env.GO_VERSION != '' }} | |
| name: "test-unit-race" | |
| run: | | |
| echo "::group:: race test" | |
| cd mod/tigron | |
| make test-unit-race | |
| echo "::endgroup::" | |
| - if: ${{ env.GO_VERSION != '' }} | |
| name: "test-unit-bench" | |
| run: | | |
| echo "::group:: bench" | |
| cd mod/tigron | |
| make test-unit-bench | |
| echo "::endgroup::" |