From 31c8d113f3fd11f85ebf1d0d84629c503615bfcd Mon Sep 17 00:00:00 2001 From: Tero Marttila Date: Fri, 24 Jun 2022 11:36:41 +0300 Subject: github workflows: add go build workflow --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..29bd97d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Go build + +on: + pull_request: + branches: + - 'master' + push: + branches: + - 'master' + +jobs: + build-go: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.15 + + - name: Go Get + run: go get -d -u + + - name: Go Build + run: go build -v + + - name: Go Test + run: go test -v -- cgit v1.2.3 From 18a763eee93587090f9353085e9269bb6958fc41 Mon Sep 17 00:00:00 2001 From: Tero Marttila Date: Fri, 24 Jun 2022 11:50:43 +0300 Subject: github workflows: use go mod --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29bd97d..47c0cb3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,12 +20,13 @@ jobs: uses: actions/setup-go@v3 with: go-version: 1.15 + cache: true - - name: Go Get - run: go get -d -u + - name: Download dependencies + run: go mod download - - name: Go Build + - name: Build run: go build -v - - name: Go Test + - name: Test run: go test -v -- cgit v1.2.3 From d5da1015fc6dba0676d4a3c5a0e263745ee610db Mon Sep 17 00:00:00 2001 From: Tero Marttila Date: Fri, 24 Jun 2022 11:53:24 +0300 Subject: github workflows: upload build artifact --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47c0cb3..86d6f70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: - 'master' jobs: - build-go: + go-build: runs-on: ubuntu-20.04 steps: @@ -30,3 +30,9 @@ jobs: - name: Test run: go test -v + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: go-build + path: ./go-nsupdate -- cgit v1.2.3