Commit 91edba69 authored by Lukas Matt's avatar Lukas Matt

Add separate documentation page

parent b5b05e79
public
docs/_site
docs/.sass-cache
docs/.jekyll-metadata
docs/public
image: debian
stages:
- test
- deploy
.job_template: &job_definition
image: debian
stage: test
artifacts:
reports:
junit: report.xml
......@@ -9,6 +14,12 @@ image: debian
- bash scripts/install.sh
script:
- bash scripts/test.sh
.job_template: &no_pipeline
except:
variables:
- $CI_PIPELINE_TRIGGERED
single project:
<<: *job_definition
only:
......@@ -16,24 +27,37 @@ single project:
- master
variables:
- $CI_PIPELINE_TRIGGERED
test diaspora:
<<: *job_definition
<<: *no_pipeline
variables:
PROJECT: diaspora
except:
variables:
- $CI_PIPELINE_TRIGGERED
test ganggo:
<<: *job_definition
<<: *no_pipeline
variables:
PROJECT: ganggo
except:
variables:
- $CI_PIPELINE_TRIGGERED
test socialhome:
<<: *job_definition
<<: *no_pipeline
variables:
PROJECT: socialhome
except:
variables:
- $CI_PIPELINE_TRIGGERED
pages:
<<: *no_pipeline
image: ruby:2.3
stage: deploy
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
before_script:
- cd docs
- bundle install
script:
- bundle exec jekyll build -d ../public
artifacts:
paths:
- public
# Federation Tests
[![](https://testsuite.feneas.org/images/stats/builds.png)](https://testsuite.feneas.org)
This repository is about automating federation tests in the network itself!
* [the-federation.info](https://the-federation.info/)
* [testsuite.feneas.org](https://testsuite.feneas.org/)
## Projects
Following projects are using the testsuite:
* [GangGo](https://github.com/ganggo)
* [Socialhome](https://github.com/jaywink/socialhome)
## Add your project
Clone this repository and create a new directory:
git clone https://git.feneas.org/feneas/federation-testsuite.git
cd federation-testsuite && mkdir <project-name>
In this folder you have to put everything which is required for building an automated docker image.
Starting with a `Dockerfile` and a start-up script e.g. `start.sh`
The start-up script is required so that we can do some configuration magic at boot time.
Following environment variables will be available while tests are running:
$DATABASE (on every run)
$PORT (on every run)
$PRREPO (only on pull_requests from a user)
$PRSHA (only on pull_requests from a user)
$(hostname -i) (if you need the container IP address)
This information we can use in our start-up script mentioned above.
For example if `PRREPO` and `PRSHA` is set we probably want to checkout the source code of the pull request first.
See for reference the start-up script of the ganggo image:
```
#!/bin/bash
repo=$GOPATH/src/github.com/ganggo/ganggo
if [ ! -z ${PRSHA} ]; then
if [ "$(basename $PRREPO)" == "ganggo.git" ]; then
cd $repo && git stash \
&& git remote add custom $PRREPO \
&& git fetch custom \
&& git checkout $PRSHA \
&& git log -1 || {
echo "Cannot find $PRREPO $PRSHA"
exit 1
}
fi
if [ "$(basename $PRREPO)" == "federation.git" ]; then
wd=$repo/vendor/github.com/ganggo/federation
rm -r $wd && git clone $PRREPO $wd \
&& cd $wd \
&& git checkout $PRSHA \
&& git log -1 || {
echo "Cannot checkout $PRREPO $PRSHA"
exit 1
}
fi
fi
sed -i "s/NAME/$DATABASE/g" $repo/conf/app.conf \
&& sed -i "s/PORT/$PORT/g" $repo/conf/app.conf \
&& revel run github.com/ganggo/ganggo
```
In the above example support for `github.com/ganggo/federation` and `github.com/ganggo/ganggo` was added.
If a user triggers a build with the following parameters:
PRREPO=https://github.com/someuser/federation.git
PRSHA=1234567890
The testsuite will replace the offical with the user repository and checkout the mentioned commit.
If you did all that `\m/` Create a pull-request with your changes in this repository and as soon as we merged it.
You can add your repository [here](https://testsuite.feneas.org/)!
Now the testing can begin :)
# Development
## Dependencies
In case you want to test specific parts locally you need `docker`.
Make sure it is up and running:
sudo systemctl start docker.service
Then you can install the testsuite dependencies:
* github.com/stedolan/jq
* github.com/sstephenson/bats
Simply run the install script or do it manually:
bash scripts/install.sh
## Run tests
After installing all required dependencies you can start tests via:
# bats <test-file> e.g.:
bats ganggo-ganggo.tx-rx.bats
Or run all tests with a single command:
bats .
## Run images
Sometimes doing tests manually helps developing a new feature. You can run single docker images by using the helper script.
Setup the environment by executing following command once:
BATS_TEST_FILENAME=local . ./test_helper.bash
Then starting can be done by executing:
# start_app <database-name> <port> "testing_<project>"$(latest_tag <project>)
# for starting a ganggo image that could look like following:
start_app g1 9000 "testing_ganggo"$(latest_tag "ganggo")
You'll find the documentation here: [feneas.git.feneas.org/federation-testsuite](https://feneas.git.feneas.org/federation-testsuite/)
source "https://rubygems.org"
gem "jekyll", "~> 3.8.5"
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
concurrent-ruby (1.1.3)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.9.25)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-watch (2.1.2)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.7.2)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 3.8.5)
BUNDLED WITH
1.16.2
The MIT License (MIT)
Copyright (c) 2016 David Lin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
nav:
- page: Federation Tests
permalink: "#federation-tests"
subnav:
- page: Projects
permalink: "#projects"
- page: Add your project
permalink: "#add-your-project"
- page: Development
permalink: "#development"
subnav:
- page: Dependencies
permalink: "#dependencies"
- page: Run tests
permalink: "#run-tests"
- page: Run images
permalink: "#run-images"
baseurl: "/federation-testsuite"
url: "https://feneas.git.feneas.org"
markdown: kramdown
kramdown:
input: GFM
<footer class="site-footer">
<div class="container">
<div class="footer left column one-half">
<section class="small-font">
Theme <a href="https://github.com/wild-flame/jekyll-simple"> Simple </a> by <a href="http://wildflame.me">wildflame</a>
© 2016
Powered by <a href="https://github.com/jekyll/jekyll">jekyll</a>
</section>
</div>
<div class="footer right column one-half">
<section class="small-font">
{% if site.github_username %}
{% include icon-github.html username=site.github_username %}
{% endif %}
{% if site.twitter_username %}
{% include icon-twitter.html username=site.twitter_username %}
{% endif %}
</section>
</div>
</div>
</footer>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<!-- evil icon -->
<link rel="stylesheet" href="{{"/assets/evil-icons.min.css" | prepend:site.baseurl }}">
<script src="{{"/assets/evil-icons.min.js" | prepend:site.baseurl }}"></script>
<!-- todo: include this into main.css -->
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head>
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
<div class="page-content">
<div class="container">
<div class="three columns">
<ul>
{% for n in site.nav %}
<li><a href="{{ n.permalink }}">{{ n.page }}</a></li>
{% if n.subnav.size > 0 %}
<ol>
{% for s in n.subnav %}
<li><a href="{{ s.permalink }}">{{ s.page }}</a></li>
{% endfor %}
</ol>
{% endif %}
{% endfor %}
</ul>
</div>
<div class="nine columns" style="z-index:100;">
<div class="wrapper">
{{ content }}
</div>
</div>
</div>
{% include footer.html %}
</div>
</body>
</html>
This diff is collapsed.
@charset "utf-8";
$color-black: #111;
$color-gray: #aaa;
$color-silver: #ddd;
$color-white: #fff;
$color-aqua: #7fdbff;
$color-blue: #0074d9;
$color-navy: #001f3f;
$color-teal: #39cccc;
$color-green: #2ecc40;
$color-olive: #3d9970;
$color-lime: #01ff70;
$color-yellow: #ffdc00;
$color-orange: #ff851b;
$color-red: #ff4136;
$color-fuchsia: #f012be;
$color-purple: #b10dc9;
$color-maroon: #85144b;
.black { color: $color-black; }
.gray { color: $color-gray; }
.silver { color: $color-silver; }
.white { color: $color-white; }
.aqua { color: $color-aqua; }
.blue { color: $color-blue; }
.navy { color: $color-navy; }
.teal { color: $color-teal; }
.green { color: $color-green; }
.olive { color: $color-olive; }
.lime { color: $color-lime; }
.yellow { color: $color-yellow; }
.orange { color: $color-orange; }
.red { color: $color-red; }
.fuchsia { color: $color-fuchsia; }
.purple { color: $color-purple; }
.maroon { color: $color-maroon; }
/* layout */
html,.container {
position:relative;
min-height:100%;
}
body {
min-height:100%;
height:auto;
}
.page-content {
min-height:100%;
box-sizing: border-box;
height:auto;
padding-bottom: 140px;/*等于或略大于footer的高度*/
}
.site-footer {
position: absolute;
bottom: 0;
padding-bottom: 0rem;
width:100%;
/* footer style */
color: #99999a;
background-color: #FAFAFB;
.left {
a {
color: #666;
border-bottom:1px dotted;
text-decoration:none;
}
a:hover {
color:red;
border-bottom:1px dotted;
}
}
}
/* Effects
—————————————————————————————————————————————————— */
.blinking_underscore {
-webkit-animation: blinking_underscore_frame 1.5s infinite ease;
-moz-animation: blinking_underscore_frame 1.5s infinite ease;
-ms-animation: blinking_underscore_frame 1.5s infinite ease;
-o-animation: blinking_underscore_frame 1.5s infinite ease;
animation: blinking_underscore_frame 1.5s infinite ease;
}
.logo {
margin-bottom:12.5px;
font-weight:$font-weight-bold;
}
.logo a {
-webkit-transition:.4s;
transition:.4s;
}
.logo a:hover {
color:#222;
background-image:-webkit-linear-gradient(bottom,#222,#222);
background-image:linear-gradient(to top,#222,#222);
text-shadow:-1px -1px 0 #FDFDFD,1px -1px 0 #FDFDFD,-1px 1px 0 #FDFDFD,1px 1px 0 #FDFDFD;
background-repeat:repeat-x;
background-size:2px 2px;
background-position:0 96%
}
.nav {
line-height: $base-line-height;
.page-link {
color: $text-color;
line-height: 1.0;
display: block;
padding: 5px 0px 0px 0px;
li {
font-size:1.5rem;
list-style:none;
font-weight: 100;
margin-bottom:1rem;
}
a:active {
font-weight: 500;
}
}
}
/* site-nav */
@include media-query($on-laptop) {
.site-nav {
/* flex box */
display: -webkit-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */
display: -moz-box; /* Firefox 17- */
display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
display: -moz-flex; /* Firefox 18+ */
display: -ms-flexbox; /* IE 10 */
display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */// Import partials from `sass_dir` (defaults to `_sass`)
opacity: 0;
height: 0;
-webkit-transition: all .4s;
transition: all .4s;
-webkit-justify-content: center;
justify-content:center;
@include media-query($on-laptop) {
border-top:1px solid #ddd;
border-bottom:1px solid #ddd;
}
}
#menu-toggle:checked+.site-nav {
opacity: 1;
height: auto;
margin-bottom:-25px;
}
}
input#menu-toggle {
display:none;
}
.nav .menu-icon {
display:none;
position:absolute;
right:5%;
@include media-query($on-laptop) {
top: 67px;
@include media-query(400px) {
top: 13px;
}
display: block;
text-align: center;
&:hover {
>svg {
path {
fill: $grey-color;
}
}
}
> svg {
width: 18px;
height: 15px;
path {
fill: $grey-color-dark;
} } }
}
.site-header {
text-align:right;
@include media-query($on-laptop){
text-align: center;
margin-bottom: 40px;
}
nav a {
font-weight:400;
}
}
.post {
@extend .dont-break-out;
}
.post-list {
}
.post_header {
margin-bottom:1rem;
}
.post_title {
margin-bottom:0.5rem;
}
.post_date {
color:#888;
font-size:1.4rem;
}
p.readmore {
text-align:right;
}
.post_meta {
.author_meta {
img {
height:24px;
width:24px;
}
}
}
.post_archive {
}
.article_meta {
}
.article-content a {
border-bottom:1px dotted red;
text-decoration:none;
}
.article-content a:hover {
color:red;
border-bottom:1px dotted red;
}
.article-footer {
padding:2rem 0;
border-top:1px solid #ddd;
border-bottom:1px solid #ddd;
.share {
text-align:center;
}
.share-link {
text-decoration:underline;
margin-left:8px;
}
}
.article_share {
}
.article_share .location {
}
.artilce-prev {
}
.article-next {
}
/* author info */
.author {
@media (max-width: $on-laptop) {
display:inline-block;
text-align:center;
}
}
.authorimage {
@media (min-width: $on-laptop+1) {
float:left;
}
display:inline-block;
width: 90px;
height: 90px;
border-radius: 5%;
-webkit-background-size: cover !important;
background-size: cover !important;
background-position: center center !important;
margin-right: 10px;
}
.authorinfo {
.bio {
color:#999;
}
}
/* footer */
.footer {
float:left;
}
.left {
text-align:center;
@media (min-width: $on-laptop) {
text-align:left;
}
}
.right {
text-align:center;
@media (min-width: $on-laptop) {
text-align:right;
}
}
/* icon */
.icon {
vertical-align: bottom;
}
body.custom-background {