Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FinClip
ligase
提交
e9314e5b
ligase
项目概览
FinClip
/
ligase
通知
36
Star
8
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ligase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e9314e5b
编写于
10月 10, 2017
作者:
E
Erik Johnston
提交者:
GitHub
10月 10, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Untangle precommit and travis test scripts (#288)
上级
38999c54
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
89 addition
and
36 deletion
+89
-36
.travis.yml
.travis.yml
+2
-2
INSTALL.md
INSTALL.md
+2
-2
hooks/pre-commit
hooks/pre-commit
+1
-30
scripts/README.md
scripts/README.md
+7
-0
scripts/build-test-lint.sh
scripts/build-test-lint.sh
+26
-0
scripts/find-lint.sh
scripts/find-lint.sh
+41
-0
scripts/install-local-kafka.sh
scripts/install-local-kafka.sh
+2
-0
scripts/travis-test.sh
scripts/travis-test.sh
+8
-2
未找到文件。
.travis.yml
浏览文件 @
e9314e5b
...
@@ -24,8 +24,8 @@ before_script:
...
@@ -24,8 +24,8 @@ before_script:
-
openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes -subj /CN=localhost
-
openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes -subj /CN=localhost
script
:
script
:
-
./
travis-instal
l-kafka.sh
-
./
scripts/install-loca
l-kafka.sh
-
./travis-test.sh
-
./
scripts/
travis-test.sh
notifications
:
notifications
:
webhooks
:
webhooks
:
...
...
INSTALL.md
浏览文件 @
e9314e5b
...
@@ -17,7 +17,7 @@ Dendrite can be run in one of two configurations:
...
@@ -17,7 +17,7 @@ Dendrite can be run in one of two configurations:
-
For Kafka (optional if using the monolith server):
-
For Kafka (optional if using the monolith server):
-
Unix-based system (https://kafka.apache.org/documentation/#os)
-
Unix-based system (https://kafka.apache.org/documentation/#os)
-
JDK 1.8+ / OpenJDK 1.8+
-
JDK 1.8+ / OpenJDK 1.8+
-
Apache Kafka 0.10.2+ (see
[
travis-install-kafka.sh
](
travis-instal
l-kafka.sh
)
for up-to-date version numbers)
-
Apache Kafka 0.10.2+ (see
[
scripts/install-local-kafka.sh
](
scripts/install-loca
l-kafka.sh
)
for up-to-date version numbers)
## Setting up a development environment
## Setting up a development environment
...
@@ -34,7 +34,7 @@ go get github.com/constabulary/gb/...
...
@@ -34,7 +34,7 @@ go get github.com/constabulary/gb/...
gb build
gb build
```
```
If using Kafka, install and start it (c.f.
[
travis-install-kafka.sh
](
travis-instal
l-kafka.sh
)
):
If using Kafka, install and start it (c.f.
[
scripts/install-local-kafka.sh
](
scripts/install-loca
l-kafka.sh
)
):
```
bash
```
bash
MIRROR
=
http://apache.mirror.anlx.net/kafka/0.10.2.0/kafka_2.11-0.10.2.0.tgz
MIRROR
=
http://apache.mirror.anlx.net/kafka/0.10.2.0/kafka_2.11-0.10.2.0.tgz
...
...
hooks/pre-commit
浏览文件 @
e9314e5b
...
@@ -2,33 +2,4 @@
...
@@ -2,33 +2,4 @@
set
-eu
set
-eu
# Tune the GC to use more memory to reduce the number of garbage collections
./scripts/build-test-lint.sh
export
GOGC
=
400
export
GOPATH
=
"
$(
pwd
)
:
$(
pwd
)
/vendor"
export
PATH
=
"
$PATH
:
$(
pwd
)
/vendor/bin:
$(
pwd
)
/bin"
echo
"Checking that it builds"
gb build
# Check that all the packages can build.
# When `go build` is given multiple packages it won't output anything, and just
# checks that everything builds. This seems to do a better job of handling
# missing imports than `gb build` does.
echo
"Double checking it builds..."
go build github.com/matrix-org/dendrite/cmd/...
echo
"Installing lint search engine..."
go
install
github.com/alecthomas/gometalinter/
gometalinter
--config
=
linter.json ./...
--install
echo
"Looking for lint..."
gometalinter
--config
=
linter.json ./...
--enable-gc
echo
"Double checking spelling..."
misspell
-error
src
*
.md
echo
"Testing..."
gb
test
echo
"Done!"
scripts/README.md
0 → 100644
浏览文件 @
e9314e5b
# Dev Scripts
These are a collection of scripts that should be helpful for those developing
on dendrite.
See
`find-lint.sh`
for environment variables that control linter resource
usage.
scripts/build-test-lint.sh
0 → 100755
浏览文件 @
e9314e5b
#! /bin/bash
# Builds, tests and lints dendrite, and should be run before pushing commits
set
-eu
export
GOPATH
=
"
$(
pwd
)
:
$(
pwd
)
/vendor"
export
PATH
=
"
$PATH
:
$(
pwd
)
/vendor/bin:
$(
pwd
)
/bin"
echo
"Checking that it builds"
gb build
# Check that all the packages can build.
# When `go build` is given multiple packages it won't output anything, and just
# checks that everything builds. This seems to do a better job of handling
# missing imports than `gb build` does.
echo
"Double checking it builds..."
go build github.com/matrix-org/dendrite/cmd/...
./scripts/find-lint.sh
echo
"Double checking spelling..."
misspell
-error
src
*
.md
echo
"Testing..."
gb
test
scripts/find-lint.sh
0 → 100755
浏览文件 @
e9314e5b
#! /bin/bash
# Runs the linters against dendrite
# The linters can take a lot of resources and are slow, so they can be
# configured using two environment variables:
#
# - `DENDRITE_LINT_CONCURRENCY` - number of concurrent linters to run,
# gometalinter defaults this to 8
# - `DENDRITE_LINT_DISABLE_GC` - if set then the the go gc will be disabled
# when running the linters, speeding them up but using much more memory.
set
-eu
export
GOPATH
=
"
$(
pwd
)
:
$(
pwd
)
/vendor"
export
PATH
=
"
$PATH
:
$(
pwd
)
/vendor/bin:
$(
pwd
)
/bin"
args
=
""
if
[
${
1
:-
""
}
=
"fast"
]
then
args
=
"--config=linter-fast.json"
else
args
=
"--config=linter.json"
fi
if
[
-n
"
${
DENDRITE_LINT_CONCURRENCY
:-}
"
]
then
args
=
"
$args
--concurrency=
$DENDRITE_LINT_CONCURRENCY
"
fi
if
[
-z
"
${
DENDRITE_LINT_DISABLE_GC
:-}
"
]
then
args
=
"
$args
--enable-gc"
fi
echo
"Installing lint search engine..."
go
install
github.com/alecthomas/gometalinter/
gometalinter
--config
=
linter.json ./...
--install
echo
"Looking for lint..."
gometalinter ./...
$args
echo
"Double checking spelling..."
misspell
-error
src
*
.md
travis-instal
l-kafka.sh
→
scripts/install-loca
l-kafka.sh
浏览文件 @
e9314e5b
# /bin/bash
# /bin/bash
# Downloads, installs and runs a kafka instance
set
-eu
set
-eu
# The mirror to download kafka from is picked from the list of mirrors at
# The mirror to download kafka from is picked from the list of mirrors at
...
...
travis-test.sh
→
scripts/
travis-test.sh
浏览文件 @
e9314e5b
#! /bin/bash
#! /bin/bash
# The entry point for travis tests
set
-eu
set
-eu
# Tune the GC to use more memory to reduce the number of garbage collections
export
GOGC
=
400
export
DENDRITE_LINT_DISABLE_GC
=
1
# Check that the servers build (this is done explicitly because `gb build` can silently fail (exit 0) and then we'd test a stale binary)
# Check that the servers build (this is done explicitly because `gb build` can silently fail (exit 0) and then we'd test a stale binary)
gb build github.com/matrix-org/dendrite/cmd/dendrite-room-server
gb build github.com/matrix-org/dendrite/cmd/dendrite-room-server
gb build github.com/matrix-org/dendrite/cmd/roomserver-integration-tests
gb build github.com/matrix-org/dendrite/cmd/roomserver-integration-tests
...
@@ -12,8 +18,8 @@ gb build github.com/matrix-org/dendrite/cmd/dendrite-media-api-server
...
@@ -12,8 +18,8 @@ gb build github.com/matrix-org/dendrite/cmd/dendrite-media-api-server
gb build github.com/matrix-org/dendrite/cmd/mediaapi-integration-tests
gb build github.com/matrix-org/dendrite/cmd/mediaapi-integration-tests
gb build github.com/matrix-org/dendrite/cmd/client-api-proxy
gb build github.com/matrix-org/dendrite/cmd/client-api-proxy
# Run
the pre commit hook
s
# Run
unit tests and linter
s
./
hooks/pre-commit
./
scripts/build-test-lint.sh
# Run the integration tests
# Run the integration tests
bin/roomserver-integration-tests
bin/roomserver-integration-tests
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录