Skip to content

Commit

Permalink
chore(ci): add testing pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjaziv committed Nov 12, 2023
1 parent fadb378 commit d43ed6f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test, Lint, Build

on: [push]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: '1.15.x'

- name: Test
run: make test

- name: Lint
run: make lint

- name: Build server
if: always()
run: make build-binary

- name: Build cli
if: always()
run: make build-cli
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ out/image-id: Dockerfile tmp/.linted.sentinel
> DOCKER_BUILDKIT=1 docker build --tag="$${image_id}" .
> echo "$${image_id}" > out/image-id

# Main server binary - re-build if the lint output is re-run.
$(binary_name): tmp/.linted.sentinel
# Main server binary
$(binary_name):
> go build -mod=vendor

# CLI binary - re-build if the lint output is re-run.
mservctl/mservctl: tmp/.linted.sentinel
mservctl/mservctl:
> cd mservctl
> go build -mod=vendor

Expand Down

0 comments on commit d43ed6f

Please sign in to comment.