@@ -17,7 +17,25 @@ permissions:
1717 contents : read
1818 issues : write
1919jobs :
20- test :
20+ go-generate :
21+ runs-on : ubuntu-24.04
22+ steps :
23+ - uses : actions/checkout@v5
24+ - uses : actions/setup-go@v6
25+ with :
26+ go-version-file : " go.mod"
27+ - uses : ./.github/actions/install-protoc
28+ - name : Install Go tools
29+ run : go install tool
30+ - name : Check go generate
31+ run : |
32+ go generate ./...
33+ if [ -n "$(git status --porcelain)" ]; then
34+ echo "go generate produced diffs:"
35+ git diff
36+ exit 1
37+ fi
38+ legacylibrarian :
2139 runs-on : ubuntu-24.04
2240 steps :
2341 - uses : actions/checkout@v5
@@ -26,33 +44,29 @@ jobs:
2644 go-version-file : " go.mod"
2745 - name : Run tests
2846 run : |
29- go test -race -coverprofile=coverage.out -covermode=atomic \
30- $(go list ./... | grep -v -E 'internal/librarian/(python|rust|dart)|internal/sidekick')
47+ go test -race -coverprofile=coverage.out -covermode=atomic ./internal/legacylibrarian/...
3148 - name : Upload coverage report
3249 uses : codecov/codecov-action@v5
3350 with :
3451 token : ${{ secrets.CODECOV_TOKEN }}
35- go-generate :
52+ test :
3653 runs-on : ubuntu-24.04
3754 steps :
3855 - uses : actions/checkout@v5
3956 - uses : actions/setup-go@v6
4057 with :
4158 go-version-file : " go.mod"
42- - uses : ./.github/actions/install-protoc
43- - name : Install Go tools
44- run : go install tool
45- - name : Check go generate
59+ - name : Run tests
4660 run : |
47- go generate ./...
48- if [ -n "$(git status --porcelain)" ]; then
49- echo "go generate produced diffs:"
50- git diff
51- exit 1
52- fi
61+ go test -race -coverprofile=coverage.out -covermode=atomic \
62+ $(go list ./... | grep -v -E 'internal/librarian/(python|rust|dart)|internal/sidekick|internal/legacylibrarian')
63+ - name : Upload coverage report
64+ uses : codecov/codecov-action@v5
65+ with :
66+ token : ${{ secrets.CODECOV_TOKEN }}
5367 create-issue-on-failure :
5468 runs-on : ubuntu-24.04
55- needs : [test, go-generate]
69+ needs : [go-generate, legacylibrarian, test ]
5670 if : ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
5771 steps :
5872 - name : Create an issue for push event to main
0 commit comments