-
Notifications
You must be signed in to change notification settings - Fork 18
45 lines (45 loc) · 1.11 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CI
on:
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
lint:
name: pull-kapacity-golangci-lint
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
cache: false
- name: Checkout code
uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
only-new-issues: true
# TODO(zqzten): add verify job
test:
name: pull-kapacity-unit-test
needs: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Rebase code
run: git rebase origin/main
- name: Run unit tests
run: make unit-test