Skip to content

Commit

Permalink
ci: change to use GitHub actions
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <[email protected]>
  • Loading branch information
FrankYang0529 authored and innobead committed May 1, 2024
1 parent d1d64ca commit 8547d75
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build
on:
push:
branches:
- master
- v*
tags:
- v*
pull_request:
jobs:
build:
name: Build binaries
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

# Build binaries
- name: Run ci
run: make ci

- uses: codecov/codecov-action@v4
with:
files: ./coverage.out
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN wget -O - https://storage.googleapis.com/golang/go1.21.3.linux-${!GOLANG_ARC
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2

ENV DAPPER_SOURCE /go/src/github.com/longhorn/backupstore
ENV DAPPER_OUTPUT ./bin
ENV DAPPER_OUTPUT ./bin coverage.out
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_ENV IMAGE REPO VERSION TAG DRONE_REPO DRONE_PULL_REQUEST DRONE_COMMIT_REF
ENV DAPPER_RUN_ARGS --privileged --tmpfs /go/src/github.com/longhorn/longhorn/integration/.venv:exec --tmpfs /go/src/github.com/longhorn/longhorn/integration/.tox:exec -v /dev:/host/dev
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ echo Running tests

PACKAGES="$(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"

go test -race -cover ${PACKAGES}
go test -race -cover ${PACKAGES} -coverprofile=coverage.out

0 comments on commit 8547d75

Please sign in to comment.