From a452c8d55bc21a70dbd83652a2a8b9d192b8456f Mon Sep 17 00:00:00 2001 From: Nuttapat Kirawittaya Date: Tue, 17 Sep 2019 19:26:57 +0800 Subject: [PATCH] Move push.yml to pull_request.yml and include Test flow --- .github/workflows/pull_request.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/push.yml | 27 --------------------------- 2 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/pull_request.yml delete mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..63d945e --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,29 @@ +name: Build on Push +on: pull_request +jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.12 + uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Test + run: make test + + - name: Build + uses: make build diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index 9d41ce1..0000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Build on Push -on: push -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.12 - uses: actions/setup-go@v1 - with: - go-version: 1.12 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v1 - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - - - name: Build - run: go build -v .