~samwhited/xmpp

ref: 8a516e9e064619dcb3d84499b66e1562546be918 xmpp/.builds/ci.yml -rw-r--r-- 1.3 KiB
8a516e9eSam Whited .builds: validate license headers 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
45
46
47
48
49
50
51
52
53
54
55
56
57
image: freebsd/latest
packages:
  - go
sources:
  - https://git.sr.ht/~samwhited/xmpp
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
  - 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 ./...
      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
  - tip: |
      go get golang.org/dl/gotip
      gotip download
      cd xmpp/
      gotip test -v -cover ./...