Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
danyalprout committed May 30, 2024
1 parent 39cf8e7 commit d4dbac9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Pull Request

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ linux/amd64, linux/arm64 ]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>=1.21.0'
- name: Go Format
run: make fmt && git diff --exit-code
- name: Go Vet
run: make vet
- name: Go Tidy
run: go mod tidy && git diff --exit-code
- name: Go Mod
run: go mod download
- name: Go Mod Verify
run: go mod verify
- name: Go Build
run: make build
- name: Go Build
run: make test





6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ integration:
RUN_INTEGRATION_TESTS=true go test -v ./...
.PHONY: integration

vet:
go vet ./...
.PHONY: vet

fmt:
gofmt -s -w .
.PHONY: fmt

check: fmt clean build build-docker lint test integration
check: fmt vet clean build build-docker lint test integration
.PHONY: check

lint:
Expand Down

0 comments on commit d4dbac9

Please sign in to comment.