Skip to content

Commit

Permalink
return github actions
Browse files Browse the repository at this point in the history
Co-authored-by: ne-sachirou <ne-sachirou@hatena.ne.jp>
  • Loading branch information
lufia and ne-sachirou committed May 28, 2020
1 parent 9cb4852 commit dba5afd
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: test

on:
push:
branches:
- master
pull_request:

jobs:
test:
strategy:
matrix:
go: ["1.14.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- run: sudo apt-get install memcached
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
- run: |
make lint
make cover
# goveralls -coverprofile=.profile.cov
test-windows:
strategy:
matrix:
go: ["1.14.x"]
runs-on: windows-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
- run: |
go get -d -v -t ./...
go build -o check-log/check-log.exe ./check-log
go build -o check-procs/check-procs.exe ./check-procs
go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
go vet -all ./check-log/... ./check-procs/... ./check-ntservice/... ./check-windows-eventlog/...
go test ./check-log/... ./check-procs/... ./check-ntservice/... ./check-windows-eventlog/...
3 changes: 3 additions & 0 deletions check-memcached/lib/check-memcached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func waitForPort(ctx context.Context, port string) error {
}

func TestMemd(t *testing.T) {
if _, err := exec.LookPath("memcached"); err != nil {
t.Skip("memcached is not installed")
}
port, err := allocUnusedPort()
if err != nil {
t.Fatal("allocUnusedPort:", err)
Expand Down

0 comments on commit dba5afd

Please sign in to comment.