Skip to content

Commit

Permalink
Merge pull request #3 from pfnet-research/setup-ci-github-actions
Browse files Browse the repository at this point in the history
Setup ci GitHub actions
  • Loading branch information
everpeace authored Jun 23, 2020
2 parents f2f9a2d + d116bfb commit 5d271de
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 5 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
types: [opened, synchronize]

jobs:

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: go mod download

- name: Get Devtools
run: make setup

- name: Lint
run : make lint

- name: Build
run: make

- name: Test
run: make test
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ setup:
npm install --prefix=.dev markdown-toc && \
npm install --prefix=.dev github-release-notes && \
cd $(shell go env GOPATH) && \
GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports && \
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint && \
GO111MODULE=off go get -u github.com/elastic/go-licenser && \
GO111MODULE=off go get -u github.com/tcnksm/ghr
go get -u golang.org/x/tools/cmd/goimports && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.27.0 && \
go get -u github.com/elastic/go-licenser && \
go get -u github.com/tcnksm/ghr

.PHONY: fmt
fmt:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pftaskqueue: Lightweight task queue tool. Feel free to process embarrassingly-parallel tasks at scale.

[![CI](https://github.com/pfnet-research/pftaskqueue/workflows/CI/badge.svg)](https://github.com/pfnet-research/pftaskqueue/actions?query=workflow%3ACI)

```
+-------------------------+
+----+ +----+ +----+ +----+
Expand Down
2 changes: 1 addition & 1 deletion pkg/worker/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ var _ = Describe("Worker", func() {
TaskHandler: apiworker.TaskHandlerSpec{
DefaultCommandTimeout: 1 * time.Minute,
Commands: []string{
"sh",
"bash",
"-c",
heredoc.Doc(`
DIR=$(cat)
Expand Down

0 comments on commit 5d271de

Please sign in to comment.