Skip to content

Commit ef93160

Browse files
authored
Merge pull request #650 from bluek8s/kartik-ci-update
migrate CI from Travis to GitHub Actions
2 parents cfcc594 + cc4c742 commit ef93160

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: '1.18.x'
22+
23+
- name: Cache Go modules
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
~/.cache/go-build
28+
~/go/pkg/mod
29+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
30+
restore-keys: |
31+
${{ runner.os }}-go-
32+
33+
- name: Install Operator SDK
34+
run: |
35+
export OPERATOR_SDK_VERSION="v0.15.2"
36+
curl -L -s https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION}/operator-sdk-${OPERATOR_SDK_VERSION}-x86_64-linux-gnu -o /usr/local/bin/operator-sdk
37+
chmod +x /usr/local/bin/operator-sdk
38+
operator-sdk version
39+
40+
- name: Install golint
41+
run: go install golang.org/x/lint/golint@latest
42+
43+
- name: Tidy modules
44+
run: go mod tidy
45+
46+
- name: Run compile
47+
run: make compile
48+
49+
- name: Run golint
50+
run: make golint
51+
52+
- name: Check format
53+
run: make check-format
File renamed without changes.

0 commit comments

Comments
 (0)