fix ci
This commit is contained in:
parent
2454a3b2d6
commit
69c021b924
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
result="$(gofmt -s -l . | grep -v '^vendor/' )"
|
||||||
|
if [ -n "$result" ]; then
|
||||||
|
echo "Go code is not formatted, run 'gofmt -s -w .'" >&2
|
||||||
|
echo "$result"
|
||||||
|
exit 1
|
||||||
|
fi
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# checks if every desired package has test files
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
source_re = re.compile(".*\.go")
|
||||||
|
test_re = re.compile(".*_test\.go")
|
||||||
|
missing = False
|
||||||
|
|
||||||
|
for root, dirs, files in os.walk("."):
|
||||||
|
# ignore some paths
|
||||||
|
if root == "." or root.startswith("./vendor") or root.startswith("./."):
|
||||||
|
continue
|
||||||
|
|
||||||
|
# source files but not test files?
|
||||||
|
if len(filter(source_re.match, files)) > 0 and len(filter(test_re.match, files)) == 0:
|
||||||
|
print("no test files for {}".format(root))
|
||||||
|
missing = True
|
||||||
|
|
||||||
|
if missing:
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
print("every package has test files")
|
|
@ -4,19 +4,22 @@ stages:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/
|
- mkdir -p "/go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/"
|
||||||
- cp -R /builds/$CI_PROJECT_PATH /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/
|
- cp -R "$CI_PROJECT_DIR" "/go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/"
|
||||||
- cd /go/src/dev.sum7.eu/$CI_PROJECT_PATH
|
- cd "/go/src/dev.sum7.eu/$CI_PROJECT_PATH"
|
||||||
- go get -d -t ./...
|
- go get -d -t ./...
|
||||||
|
|
||||||
build-my-project:
|
build-my-project:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- go install dev.sum7.eu/$CI_PROJECT_PATH
|
- mkdir "$CI_PROJECT_DIR/bin/"
|
||||||
- mv /go/bin/$CI_PROJECT_NAME /builds/$CI_PROJECT_PATH
|
- go install "dev.sum7.eu/$CI_PROJECT_PATH"
|
||||||
|
- mv "/go/bin/$CI_PROJECT_NAME" "$CI_PROJECT_DIR/bin/$CI_PROJECT_NAME"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_NAME
|
- "bin/$CI_PROJECT_NAME"
|
||||||
|
- yaja-bot_example.conf
|
||||||
|
- yaja-tester_example.conf
|
||||||
|
|
||||||
test-my-project:
|
test-my-project:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -26,6 +29,7 @@ test-my-project:
|
||||||
- ./.ci/check-gofmt
|
- ./.ci/check-gofmt
|
||||||
- ./.ci/check-testfiles
|
- ./.ci/check-testfiles
|
||||||
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
|
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
|
||||||
|
- go tool cover -func=.testCoverage.txt
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- .testCoverage.txt
|
- .testCoverage.txt
|
||||||
|
|
23
README.md
23
README.md
|
@ -1,11 +1,11 @@
|
||||||
# yaja (Yet Another JAbber implementation)
|
# yaja (Yet Another JAbber implementation)
|
||||||
|
|
||||||
[![DroneCI](https://ci.sum7.eu/api/badges/genofire/yaja/status.svg?branch=master)](https://ci.sum7.eu/genofire/yaja)
|
[![pipeline status](https://dev.sum7.eu/genofire/yaja/badges/master/pipeline.svg)](https://dev.sum7.eu/genofire/yaja/pipelines)
|
||||||
[![CircleCI](https://circleci.com/gh/genofire/yaja/tree/master.svg?style=shield)](https://circleci.com/gh/genofire/yaja/tree/master)
|
[![coverage report](https://dev.sum7.eu/genofire/yaja/badges/master/coverage.svg)](https://dev.sum7.eu/genofire/yaja/pipelines)
|
||||||
[![Coverage Status](https://coveralls.io/repos/github/genofire/yaja/badge.svg?branch=master)](https://coveralls.io/github/genofire/yaja?branch=master)
|
[![Go Report Card](https://goreportcard.com/badge/dev.sum7.eu/genofire/yaja)](https://goreportcard.com/report/dev.sum7.eu/genofire/yaja)
|
||||||
[![codecov](https://codecov.io/gh/genofire/yaja/branch/master/graph/badge.svg)](https://codecov.io/gh/genofire/yaja)
|
[![GoDoc](https://godoc.org/dev.sum7.eu/genofire/yaja?status.svg)](https://godoc.org/dev.sum7.eu/genofire/yaja)
|
||||||
[![Go Report Card](https://goreportcard.com/badge/github.com/genofire/yaja)](https://goreportcard.com/report/github.com/genofire/yaja)
|
[![](https://inverse.chat/badge.svg?room=yaja@conference.chat.sum7.eu)](https://conversations.im/j/yaja@conference.chat.sum7.eu)
|
||||||
[![chat on our conference room](https://camo.githubusercontent.com/a839cc0a3d4dac7ec82237381b165dd144365b6d/68747470733a2f2f74696e7975726c2e636f6d2f6a6f696e7468656d7563)](https://conversations.im/j/yaja@conference.chat.sum7.eu)
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- XMPP Library (first version - PR are welcome)
|
- XMPP Library (first version - PR are welcome)
|
||||||
|
@ -47,6 +47,17 @@ all implementation of all comman (RFCs and XEPs) xml element
|
||||||
- SendRecv to get answer of a request
|
- SendRecv to get answer of a request
|
||||||
- Register
|
- Register
|
||||||
|
|
||||||
|
## Get yaja
|
||||||
|
|
||||||
|
#### Download
|
||||||
|
|
||||||
|
Latest Build binary from ci here:
|
||||||
|
|
||||||
|
[Download All](https://dev.sum7.eu/genofire/yaja/-/jobs/artifacts/master/download/?job=build-my-project) (with config example)
|
||||||
|
|
||||||
|
[Download Binary](https://dev.sum7.eu/genofire/yaja/-/jobs/artifacts/master/raw/bin/yaja?inline=false&job=build-my-project)
|
||||||
|
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
package bot
|
|
@ -0,0 +1 @@
|
||||||
|
package database
|
|
@ -0,0 +1 @@
|
||||||
|
package model
|
Reference in New Issue