~samwhited/xmpp

ref: 07c0fcc4e5ab13995ab52449e7ddc695dbe48b7d xmpp/.builds/validate.yml -rw-r--r-- 1.0 KiB
07c0fcc4Sam Whited .builds: split testing and validation builds 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
image: alpine/edge
packages:
  - go
sources:
  - https://git.sr.ht/~samwhited/xmpp
environment:
  GO111MODULE: "on"
tasks:
  - setup: |
      go version
      go env

      go get -u golang.org/x/lint/golint
      go get -u github.com/securego/gosec/cmd/gosec
      go get -u git.sr.ht/~samwhited/checkdoc
      go get -u mellium.im/checkmd

      echo 'export PATH=$(go env GOPATH)/bin:$PATH' >> ~/.buildenv
  - lint: |
      cd xmpp/
      go vet ./...
      gofmt -s -l . && [ -z "$(gofmt -s -l .)" ]

      golint -set_exit_status ./...
      gosec ./...

      checkdoc -fileheader.pattern='-' ./... <<EOF
      Copyright \d\d\d\d The Mellium Contributors\.
      Use of this source code is governed by the BSD 2-clause
      license that can be found in the LICENSE file\.
      EOF

      checkmd .
  - validate: |
      cd xmpp/
      go mod tidy
      git diff --exit-code -- go.mod go.sum
      cd examples/
      for d in ./*/; do
        pushd $d
        go mod tidy
        git diff --exit-code -- go.mod go.sum
        popd
      done