Skip to content

Commit 629f3ba

Browse files
authored
Streamline GitHub Actions. (#39)
Move the build of the manager binary to the unit-tests Prow script. Remove the linting of the code in favor of the lint Prow script.
1 parent f7499fe commit 629f3ba

File tree

3 files changed

+39
-56
lines changed

3 files changed

+39
-56
lines changed

.github/workflows/test-build.yml

-56
This file was deleted.

.github/workflows/test-codecov.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test and upload to Codecov
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
test-build:
11+
name: Test and upload to Codecov
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- uses: actions/setup-go@v3
19+
with:
20+
go-version: 1.18
21+
22+
- name: Generate code
23+
run: make generate
24+
25+
- name: Run tests
26+
run: make unit-test
27+
28+
- name: Upload the coverage to Codecov
29+
uses: codecov/codecov-action@v3

ci/prow/lint

+10
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,14 @@
22

33
set -euxo pipefail
44

5+
# Generate code and compare with the current source.
6+
# Fail with a diff if some files are outdated.
7+
go install github.com/golang/mock/[email protected]
8+
PATH="${PATH}:${GOPATH}/bin" make generate
9+
10+
if ! git diff --exit-code; then
11+
echo "Changes detected"
12+
exit 1
13+
fi
14+
515
make lint

0 commit comments

Comments
 (0)