From 2f9724ca8813dd629ead19b22be89bf6b007d1e5 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Mon, 2 Feb 2026 09:13:06 -0500 Subject: [PATCH] Improve CI workflow * Enables cache of `go install`'d binaries * Drops unnecessary `fetch-depth: 1` (default) * Removes unnecessary step `name:`s * Reorders so that we run longest steps last (test/conformance) and move `format` / `checkgenerate` earlier --- .github/workflows/ci.yaml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6f3e392..790a655 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,11 +2,11 @@ name: CI on: push: branches: [main] - tags: ['v*'] + tags: ["v*"] pull_request: branches: [main] schedule: - - cron: '15 22 * * *' + - cron: "15 22 * * *" workflow_dispatch: {} # support manual runs permissions: contents: read @@ -21,33 +21,24 @@ jobs: resolution: ["highest", "lowest-direct"] env: # Shared env variables for all the tests - UV_RESOLUTION: '${{ matrix.resolution }}' + UV_RESOLUTION: "${{ matrix.resolution }}" steps: - - name: Checkout code - uses: actions/checkout@v6 - with: - fetch-depth: 1 - - name: Install Go - uses: actions/setup-go@v6 + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 with: go-version: stable - cache: false + # We use this to install `buf`, and the `buf` version is controlled by the Makefile. + cache-dependency-path: Makefile - uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: make install - - name: Lint - run: make lint - - name: Execute tests - run: make test - - name: Test conformance - run: make conformance - - name: Format - run: make format + - run: make install + - run: make lint + - run: make format # When running with matrix.resolution == highest, we expect uv.lock to change, but we don't want that file checked in. - if: matrix.resolution == 'lowest-direct' - name: Check generated run: make checkgenerate env: BUF_TOKEN: ${{ secrets.BUF_TOKEN }} + - run: make test + - run: make conformance