update github.com/spf13/cobra v1.10.2, switch to go.yaml.in/yaml/v3 #260
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
| name: test | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'releases/v*' | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| jobs: | |
| prepare-validate: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| targets: ${{ steps.generate.outputs.targets }} | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| - | |
| name: List targets | |
| id: generate | |
| uses: docker/bake-action/subaction/list-targets@v6 | |
| with: | |
| target: validate | |
| validate: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - prepare-validate | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: ${{ fromJson(needs.prepare-validate.outputs.targets) }} | |
| steps: | |
| - | |
| name: Validate | |
| uses: docker/bake-action@v6 | |
| with: | |
| targets: ${{ matrix.target }} | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Test | |
| uses: docker/bake-action@v6 | |
| with: | |
| targets: test | |
| - | |
| name: Upload coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.txt | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| example: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| - | |
| name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.24" | |
| - | |
| name: Download modules | |
| run: | | |
| go mod download | |
| working-directory: ./example | |
| - | |
| name: Run | |
| run: | | |
| go run main.go | |
| working-directory: ./example | |
| - | |
| name: List docs | |
| run: | | |
| tree -nh ./example/docs | |
| - | |
| name: Upload docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: example-docs | |
| path: ./example/docs/* | |
| if-no-files-found: error |