Skip to content

Commit aea6258

Browse files
Minor tweaks to CI workflow
* Rename inner job to `ci` rather than `build` * Reorganize steps so longest bits run last (fail fast) * Add `persist-credentials: false` to actions/checkout to appease zizmor Signed-off-by: Stefan VanBuren <svanburen@buf.build>
1 parent 71537c8 commit aea6258

1 file changed

Lines changed: 18 additions & 14 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
jobs:
20-
build:
20+
ci:
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
@@ -57,6 +57,8 @@ jobs:
5757

5858
steps:
5959
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60+
with:
61+
persist-credentials: false
6062

6163
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
6264
with:
@@ -73,28 +75,28 @@ jobs:
7375
if: startsWith(matrix.os, 'ubuntu-')
7476
run: uv run poe lint
7577

78+
- name: check running generate does not create a diff
79+
# NOTE: running on macOS as our sed command only works there
80+
# We expect uv.lock to change when matrix.resolution == "lowest-direct", so we don't check it there.
81+
if: ${{ startsWith(matrix.os, 'macos-') && matrix.resolution == 'highest' }}
82+
run: uv run poe checkgenerate
83+
env:
84+
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
85+
7686
- name: run python tests
7787
run: uv run poe test ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
7888

79-
- name: run conformance tests
80-
# TODO: Debug stdin/stdout issues on Windows
81-
if: ${{ !startsWith(matrix.os, 'windows-') }}
82-
run: uv run poe test-conformance ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
83-
8489
- name: run OTel tests
8590
run: uv run poe test-otel ${{ matrix.coverage == 'cov' && '--cov=connectrpc_otel --cov-report=xml' || '' }}
8691

8792
- name: run Go tests
8893
run: go test ./...
8994
working-directory: protoc-gen-connect-python
9095

91-
- name: check running generate does not create a diff
92-
# NOTE: running on macOS as our sed command only works there
93-
# We expect uv.lock to change when matrix.resolution == "lowest-direct", so we don't check it there.
94-
if: ${{ startsWith(matrix.os, 'macos-') && matrix.resolution == 'highest' }}
95-
run: uv run poe checkgenerate
96-
env:
97-
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
96+
- name: run conformance tests
97+
# TODO: Debug stdin/stdout issues on Windows
98+
if: ${{ !startsWith(matrix.os, 'windows-') }}
99+
run: uv run poe test-conformance ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
98100

99101
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
100102
if: ${{ matrix.coverage == 'cov' }}
@@ -103,9 +105,11 @@ jobs:
103105

104106
publish:
105107
runs-on: ubuntu-24.04
106-
needs: build
108+
needs: ci
107109
steps:
108110
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
111+
with:
112+
persist-credentials: false
109113

110114
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
111115

0 commit comments

Comments
 (0)