From e8e2ac2b34c1bc73dd09f37c0ab33a02a9870817 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 26 Oct 2018 12:37:13 +0300 Subject: [PATCH] Run unit tests in docker multi-stage build --- .github/main.workflow | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/main.workflow b/.github/main.workflow index e5c33c0..82d89cd 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -8,21 +8,14 @@ action "Is branch" { args = "ref refs/heads/*" } -action "Test branch" { +action "Test and build branch" { needs = ["Is branch"] - uses = "docker://golang:1.10" - runs = "sh -c" - args = ["cp -a vendor/. /usr/local/go/src; go test -v ./..."] -} - -action "Build branch" { - needs = ["Test branch"] uses = "actions/docker/cli@master" args = "build -t app -f Dockerfile.ci ." } action "Tag branch" { - needs = ["Build branch"] + needs = ["Test and build branch"] uses = "actions/docker/cli@master" args = "tag app ${DOCKER_IMAGE}:$(echo ${GITHUB_REF} | rev | cut -d/ -f1 | rev)-$(echo ${GITHUB_SHA} | head -c7)" secrets = ["DOCKER_IMAGE"]