Skip to content

Commit

Permalink
add GitHub workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed May 20, 2024
1 parent b46713e commit 829e282
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 21 deletions.
19 changes: 0 additions & 19 deletions .cirrus.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: validate

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build_and_test:
runs-on: ubuntu-latest
container:
image: golang:1.22
options: --user root
env:
CODECOV_TOKEN: ENCRYPTED[64481ea00b08c4703bf350a2ad3d5a6fd7a00269576784b2943cce62604798e88f532e19fb66859fa68f43dbd4a0df15]
steps:
- uses: actions/checkout@v2
- name: vendor
run: |
make vendor
./hack/tree_status.sh
- name: lint
run: |
make .install.tools
make check
- name: build
run: |
apt-get -qq update
apt-get -qq install vim bats ripgrep less
make build
make test
make build.coverage
make test-integration.coverage
make codecov
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PATH := $(CURDIR)/test/bin:$(PATH)

GO_SRC=$(shell find . -name \*.go)

GO_BUILD=$(GO) build
GO_BUILD=$(GO) build $(GO_BUILD_EXTRA_FLAGS)
# Go module support: set `-mod=vendor` to use the vendored sources
ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true)
GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor
Expand All @@ -42,7 +42,7 @@ all: check build

.PHONY: build
build: $(GO_SRC)
$(GO_BUILD) -buildmode=pie -o $(BUILD_DIR)/$(NAME) -ldflags "-s -w -X main.version=${VERSION}-$(COMMIT)"
$(GO_BUILD) -o $(BUILD_DIR)/$(NAME) -ldflags "-s -w -X main.version=${VERSION}-$(COMMIT)"

.PHONY: build.coverage
build.coverage: $(GO_SRC)
Expand Down

0 comments on commit 829e282

Please sign in to comment.