Skip to content

Commit 275cbd8

Browse files
committed
.github/workflows: Add the unit and verify workflows
Introduce two additional GH action workflows that match the existing prow-based unit/verify jobs, with the intention of migrating off prow entirely for master/4.8+ branch(es). Signed-off-by: timflannagan <[email protected]>
1 parent 02d278b commit 275cbd8

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/unit.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: unit
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- '**'
9+
- '!doc/**'
10+
jobs:
11+
unit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-go@v2
16+
with:
17+
go-version: '~1.16'
18+
- name: Install Kubebuilder
19+
run: |
20+
os=$(go env GOOS)
21+
arch=$(go env GOARCH)
22+
curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/
23+
sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder
24+
- name: Run unit tests
25+
run: make unit

.github/workflows/verify.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: verify
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- '**'
9+
- '!doc/**'
10+
jobs:
11+
verify:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-go@v2
16+
with:
17+
go-version: '~1.16'
18+
19+
# Note(tflannag): We need to explicitly setup the GOPATH as the generate-internal-groups.sh
20+
# codegen script still relies on $GOPATH being set and will return an error otherwise.
21+
# The setup-go action does not set this value for us: https://github.com/actions/setup-go/issues/14.
22+
- name: Run the verify target
23+
run: |
24+
export GOPATH=$(go env GOPATH)
25+
make verify

0 commit comments

Comments
 (0)