Skip to content

Commit 7bc9100

Browse files
Improve CI workflow (#422)
* 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
1 parent 4d3c769 commit 7bc9100

1 file changed

Lines changed: 12 additions & 21 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: CI
22
on:
33
push:
44
branches: [main]
5-
tags: ['v*']
5+
tags: ["v*"]
66
pull_request:
77
branches: [main]
88
schedule:
9-
- cron: '15 22 * * *'
9+
- cron: "15 22 * * *"
1010
workflow_dispatch: {} # support manual runs
1111
permissions:
1212
contents: read
@@ -21,33 +21,24 @@ jobs:
2121
resolution: ["highest", "lowest-direct"]
2222
env:
2323
# Shared env variables for all the tests
24-
UV_RESOLUTION: '${{ matrix.resolution }}'
24+
UV_RESOLUTION: "${{ matrix.resolution }}"
2525
steps:
26-
- name: Checkout code
27-
uses: actions/checkout@v6
28-
with:
29-
fetch-depth: 1
30-
- name: Install Go
31-
uses: actions/setup-go@v6
26+
- uses: actions/checkout@v6
27+
- uses: actions/setup-go@v6
3228
with:
3329
go-version: stable
34-
cache: false
30+
# We use this to install `buf`, and the `buf` version is controlled by the Makefile.
31+
cache-dependency-path: Makefile
3532
- uses: astral-sh/setup-uv@v7
3633
with:
3734
python-version: ${{ matrix.python-version }}
38-
- name: Install dependencies
39-
run: make install
40-
- name: Lint
41-
run: make lint
42-
- name: Execute tests
43-
run: make test
44-
- name: Test conformance
45-
run: make conformance
46-
- name: Format
47-
run: make format
35+
- run: make install
36+
- run: make lint
37+
- run: make format
4838
# When running with matrix.resolution == highest, we expect uv.lock to change, but we don't want that file checked in.
4939
- if: matrix.resolution == 'lowest-direct'
50-
name: Check generated
5140
run: make checkgenerate
5241
env:
5342
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
43+
- run: make test
44+
- run: make conformance

0 commit comments

Comments
 (0)