Separate out GitHub Actions

This commit is contained in:
Ben Johnson
2022-01-25 16:06:47 -07:00
parent 8d759bb0b8
commit ffaba87b40
7 changed files with 165 additions and 127 deletions

25
.github/workflows/build_and_test.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: "Build and Unit Test"
on: pull_request
jobs:
build:
name: Build
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ inputs.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ inputs.os }}-go-
- name: Build binary
run: go install ./cmd/litestream
- name: Run unit tests
run: make testdata && go test -v ./...