This repository was archived by the owner on Sep 11, 2025. It is now read-only.
chore(deps): Update go minor and patch #852
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
| # This workflow will test all Go projects in the repository | |
| name: ci-go-test | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| paths: | |
| - .github/workflows/ci-go-test.yml | |
| - "**/*.go" | |
| - "**/go.mod" | |
| - "**/testdata/**" | |
| permissions: | |
| contents: read | |
| actions: write | |
| jobs: | |
| get-dirs: | |
| if: github.event_name == 'pull_request' | |
| name: search | |
| runs-on: ubuntu-latest | |
| outputs: | |
| dirs: ${{ steps.get-dirs.outputs.dirs }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Search for go.mod files | |
| id: get-dirs | |
| run: > | |
| echo "dirs=$( | |
| find . -name 'go.mod' -exec dirname {} \; | | |
| sed 's|^\./||' | | |
| jq -Rsc 'split("\n")[:-1]' | |
| )" >> ${GITHUB_OUTPUT} | |
| go-test: | |
| needs: get-dirs | |
| name: test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| dir: ${{ fromJson(needs.get-dirs.outputs.dirs) }} | |
| defaults: | |
| run: | |
| working-directory: ${{ matrix.dir }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.25.0 | |
| cache-dependency-path: "${{ matrix.dir }}/go.sum" | |
| - name: Run Unit Tests | |
| run: | | |
| go install github.com/jstemmer/go-junit-report/v2@latest | |
| go test -v -race 2>&1 ./... | go-junit-report -set-exit-code -iocopy -out report.xml | |
| - name: Generate Test Summary | |
| if: always() | |
| uses: test-summary/action@v2 | |
| with: | |
| paths: "${{ matrix.dir }}/report.xml" |