~samwhited/xmpp

07c0fcc4e5ab13995ab52449e7ddc695dbe48b7d — Sam Whited 5 months ago 8a516e9
.builds: split testing and validation builds

The validation steps don't depend on the testing steps and I sometimes
don't want to wait for the long setup installing static analysis tools
before getting test results or wait for tests to run to get validation
results so run these in parallel.

Signed-off-by: Sam Whited <sam@samwhited.com>
2 files changed, 29 insertions(+), 16 deletions(-)

A .builds/test.yml
R .builds/{ci.yml => validate.yml}
A .builds/test.yml => .builds/test.yml +26 -0
@@ 0,0 1,26 @@
image: freebsd/latest
packages:
  - go
sources:
  - https://git.sr.ht/~samwhited/xmpp
tasks:
  - setup: |
      go version
      go env

      echo 'export PATH=$(go env GOPATH)/bin:$PATH' >> ~/.buildenv
  - stable: |
      cd xmpp/
      go test -v -cover ./...
  - examples: |
      cd xmpp/examples/
      for d in ./*/; do
        pushd $d
        go build
        popd
      done
  - tip: |
      go get golang.org/dl/gotip
      gotip download
      cd xmpp/
      gotip test -v -cover ./...

R .builds/ci.yml => .builds/validate.yml +3 -16
@@ 1,8 1,10 @@
image: freebsd/latest
image: alpine/edge
packages:
  - go
sources:
  - https://git.sr.ht/~samwhited/xmpp
environment:
  GO111MODULE: "on"
tasks:
  - setup: |
      go version


@@ 14,16 16,6 @@ tasks:
      go get -u mellium.im/checkmd

      echo 'export PATH=$(go env GOPATH)/bin:$PATH' >> ~/.buildenv
  - stable: |
      cd xmpp/
      go test -v -cover ./...
  - examples: |
      cd xmpp/examples/
      for d in ./*/; do
        pushd $d
        go build
        popd
      done
  - lint: |
      cd xmpp/
      go vet ./...


@@ 50,8 42,3 @@ tasks:
        git diff --exit-code -- go.mod go.sum
        popd
      done
  - tip: |
      go get golang.org/dl/gotip
      gotip download
      cd xmpp/
      gotip test -v -cover ./...