From f05ced3fec538642b53300eb16013102de177467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dud=C3=A1s=20=C3=81d=C3=A1m?= Date: Tue, 15 Feb 2022 18:57:15 +0100 Subject: [PATCH] run tests on push --- .github/workflows/go.yml | 31 ++++++++++++++++++++++++------- .github/workflows/server.yml | 6 +++--- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8c66f4d..17ae120 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,23 +1,40 @@ name: Go -on: [push] -jobs: +on: +- push + +jobs: build: name: Build runs-on: ubuntu-latest steps: + - name: Set up Go 1.17 + uses: actions/setup-go@v1 + with: + go-version: 1.17 + + - name: Check out code into the Go module directory + uses: actions/checkout@master + + - name: Build kurun binary + run: go build -v . + tests: + name: Tests + runs-on: ubuntu-latest + steps: - name: Set up Go 1.17 uses: actions/setup-go@v1 with: go-version: 1.17 - id: go - name: Check out code into the Go module directory uses: actions/checkout@master - - name: Get dependencies - run: go mod download + - name: Run kurun tests + run: go test ./... + + - name: Run tunnel tests + run: go test ./... + working-directory: ./tunnel - - name: Build - run: go build -v . diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index df90daa..cd61781 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -1,4 +1,4 @@ -name: Server Image +name: Server image on: push: @@ -11,7 +11,7 @@ env: jobs: docker: - name: Docker + name: Docker build and push runs-on: ubuntu-latest steps: - name: Checkout code @@ -39,7 +39,7 @@ jobs: env: REF_NAME: ${{ github.ref_name }} REF_TYPE: ${{ github.ref_type }} - - name: Build Server + - name: Build kurun-server image uses: docker/build-push-action@v2 with: context: tunnel/