Skip to content

Commit 781ea28

Browse files
added circleci as gh action YAML (#1281)
* added circleci as gh action YAML Signed-off-by: krishnaduttPanchagnula <krishnadutt123@gmail.com> * merged all changes into one Signed-off-by: krishnaduttPanchagnula <krishnadutt123@gmail.com> --------- Signed-off-by: krishnaduttPanchagnula <krishnadutt123@gmail.com>
1 parent a09a1d3 commit 781ea28

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/Circle-ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test and Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
go_version: ["1.18", "1.19", "1.20"]
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Go ${{ matrix.go_version }}
24+
uses: actions/setup-go@v4
25+
with:
26+
go-version: ${{ matrix.go_version }}
27+
28+
- name: Cache Go modules
29+
id: cache
30+
uses: actions/cache@v3
31+
with:
32+
path: ~/go/pkg/mod
33+
key: v1-go${{ matrix.go_version }}
34+
35+
- name: Run tests and check license
36+
run: make check_license test
37+
env:
38+
CI: true
39+
40+
- name: Run lint
41+
run: make lint
42+
43+
- name: Run style and unused
44+
if: ${{ matrix.go_version == '1.20' }}
45+
run: make style unused

0 commit comments

Comments
 (0)