-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 909 Bytes
/
pr_ci.yml
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
# This workflow will build and test a golang project
name: PR CI
run-name: "CI pipeline for PR - (#${{ github.event.number }}) ${{ github.event.pull_request.title }}"
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
ci:
name: Run CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Download Go dependencies
run: go get ./... && go mod tidy
- name: Check if all dependencies were commited
shell: bash
run: |
if [ "$(git status --porcelain)" ]; then
git status
exit 1
else
exit 0
fi
- name: Build codegen
run: go build -v ./...
- name: Test codegen
run: go test -v ./...