Setup buf modules and cleanup README #9
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '15 22 * * *' | |
| workflow_dispatch: {} # support manual runs | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci: | |
| name: "Tests and Benchmarks" | |
| strategy: | |
| matrix: | |
| # We use macos here because those are the only ARM runners available | |
| # to private repositories. | |
| os: [ubuntu-latest, macos-15] | |
| tags: ["", debug] | |
| go-version: [1.24.x] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: {fetch-depth: 1} | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: {go-version: "${{ matrix.go-version }}"} | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: "${{ runner.os }}-hyperpb-ci-${{ hashFiles('**/go.sum') }}" | |
| restore-keys: "${{ runner.os }}-hyperpb-ci-" | |
| - name: Check Generated Files | |
| if: ${{ matrix.tags == '' }} | |
| run: | | |
| make generate | |
| make checkgenerate | |
| - name: Test | |
| run: make test TAGS=${{ matrix.tags }} | |
| - name: Benchmark | |
| if: ${{ matrix.tags == '' }} | |
| run: make bench BENCHMARK="B/^descriptor.yaml" | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: [1.24.x] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: {fetch-depth: 1} | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: {go-version: "${{ matrix.go-version }}"} | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: {version: v2.1.6} # Keep in sync with the Makefile. |