GitLab-CI support
What was done:
- Converted
.travis-ci.yml
to the equivalent in.gitlab-ci.yml
and added additional rubies. - JRuby support is removed as we don't use and a dependent gem removed the support for it: https://github.com/jgarber/redcloth/issues/31#issuecomment-252954871
- Fixed
README.pod
fixture to use a valid markup - Fixed
README.pod.html
to include updated expected render.
Merge request reports
Activity
Current build status:
19 runs, 48 assertions, 7 failures, 0 errors, 0 skips
This is using unmodified code from original repository that builds correctly in travis: https://travis-ci.org/github/markup/builds/146697156
I tried to debug it locally using this Dockerfile to generate a similar environment that our CI was running in:
FROM ruby:2.3 RUN apt update && apt install python-pip -y && apt-get clean RUN pip install docutils VOLUME /github-markup WORKDIR /github-markup COPY . /github-markup RUN bundle install --jobs=4
I was able to replicate the issue, but not find any workaround. This is the assumptions I tried:
- rvm ruby had different patches than the one in dockerized
ruby:2.1 / 2.2 / 2.3 etc
, this could be anything like default encodings (as some tests seems related to existance or lack of newlines). - different docutils version (I tried 0.11 and 0.12, with same results).
So the next assumption is Debian vs Ubuntu (as
ruby:<version>
images use debian as a base).I tried with this Dockerfile to simulate the CI and have a close to travis environment:
FROM ubuntu:xenial RUN apt update && apt install python-pip curl git -y && apt-get clean RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 RUN \curl -sSL https://get.rvm.io | bash -s stable RUN pip install docutils RUN export PATH=$PATH:/usr/local/rvm/bin RUN /bin/bash --login -c "rvm install 2.2.5" RUN /bin/bash --login -c "rvm use 2.2.5 --default && gem install bundler" ENTRYPOINT /bin/bash --login VOLUME /github-markup WORKDIR /github-markup COPY . /github-markup RUN /bin/bash --login -c "bundle install --jobs=4"
Got same results.
Edited by Gabriel Mazetto- rvm ruby had different patches than the one in dockerized
Added 1 commit:
- d7d1b96a - Fix locales in GitLab-CI
with d7d1b96a, I defined an UNICODE locale, which improved the specs to just a single failure (on my docker simulated environment):
1) Failure: MarkupTest#test_pod [/github-markup/test/markup_test.rb:72]: README.pod.html's contents are not html equal to output: --- - 2016-10-11 01:59:55.356298480 +0000 +++ test/markups/README.pod.html 2016-08-24 13:39:21.000000000 +0000 @@ -1,14 +1,14 @@ <a name="___top"></a> -<h1><a name="Matrixy">Matrixy</a></h1> +<h1><a href="#___top" title="click to go to top of document" name="Matrixy">Matrixy</a></h1> -<h2><a name="INTRODUCTION">INTRODUCTION</a></h2> +<h2><a href="#___top" title="click to go to top of document" name="INTRODUCTION">INTRODUCTION</a></h2> <p>This is a port of the MATLAB/Octave programming language to Parrot. See the ROADMAP file for more information on the status of this project, and what else needs to be done.</p> -<h2><a name="ABOUT">ABOUT</a></h2> +<h2><a href="#___top" title="click to go to top of document" name="ABOUT">ABOUT</a></h2> <p>Primary goals are:</p> @@ -16,7 +16,7 @@ <p>=item* Create a working compiler that understands the majority of the MATLAB/Octave programming language.</p> </blockquote> -<h2><a name="IMPLEMENTATION">IMPLEMENTATION</a></h2> </blockquote> -<h2><a name="DEPENDENCIES">DEPENDENCIES</a></h2> +<h2><a href="#___top" title="click to go to top of document" name="DEPENDENCIES">DEPENDENCIES</a></h2> <p>Matrixy depends on these dependencies:</p> -<h3><a name="Parrot">Parrot</a></h3> +<h3><a href="#___top" title="click to go to top of document" name="Parrot">Parrot</a></h3> <p>To get a proper version of Parrot to build Matrixy, you will need to check out and build Parrot from source:</p> @@ -57,28 +57,28 @@ perl Configure.pl make && make test && make install-dev</pre> -<h3><a name="Parrot-Linear-Algebra">Parrot-Linear-Algebra</a></h3> +<h3><a href="#___top" title="click to go to top of document" name="Parrot-Linear-Algebra">Parrot-Linear-Algebra</a></h3> <p>The linear algebra package for Parrot is available separately and provides functionality required by Matrixy. This includes matrix data types and matrix manipulation libraries</p> -<h2><a name="BUILDING">BUILDING</a></h2> +<h2><a href="#___top" title="click to go to top of document" name="BUILDING">BUILDING</a></h2> <p>Once all dependencies are in place, you can build Matrixy using this sequence of commands:</p> <pre> perl Configure.pl nmake test</pre> -<h2><a name="TODO">TODO</a></h2> +<h2><a href="#___top" title="click to go to top of document" name="TODO">TODO</a></h2> <pre> * Parser * Standard Builtins * Test against Octave Test Suite.</pre> -<h2><a name="BUGS">BUGS</a></h2> +<h2><a href="#___top" title="click to go to top of document" name="BUGS">BUGS</a></h2> <p>Lots!</p> -<h2><a name="CONTACT">CONTACT</a></h2> +<h2><a href="#___top" title="click to go to top of document" name="CONTACT">CONTACT</a></h2> <p>If you need to contact the Matrixy team, go to the project home page at:</p> 19 runs, 48 assertions, 1 failures, 0 errors, 0 skips
This could also be related to incorrect versions being used during the tests or something that still needs to be uncovered.
@marin I'm blocked here by this error and to continue I will need to dig deeper and debug more... but as having the gem released and the other parts around will deliver more value I think this should became a technical debt that we try to address in the future.
Edited by Gabriel MazettoAdded 1 commit:
- c565d1c2 - Fix JRuby environment with required packages
@brodock Could you try to use the same version of python like we ship in the package? It should be a quick enough test, boot up and image and in the
before_script
compile python 3.We cannot ship gem in our codebase with failing specs, @dzaporozhets knows where we live :)
@brodock Also, I though we were naming this gem differently https://gitlab.com/gitlab-org/gitlab-ce/issues/21696#note_16655756 ?
@marin we are, this repo was created earlier, I will rename it.
I'm trying out this PR: https://github.com/github/markup/pull/241/files to see if it fixes the specs in our environment.
Interesting stuff, we don't render
.pod
files in current GitLab. So fixing this will enable us to render.pod
correctly. See as an example of not rendered file: https://gitlab.com/brodock/github-markup/blob/master/test/markups/README.podlib/gitlab/markup_helper.rb
:def markup?(filename) gitlab_markdown?(filename) || asciidoc?(filename) || filename.downcase.end_with?(*%w(.textile .rdoc .org .creole .wiki .mediawiki .rst)) end
This file excludes
.pod
as a known markup. If we want to enable it in GitLab we have to make sure (after the omnibus part) we add.pod
to this list.I took a different route (the mentioned PR have some major changes and isn't finished yet (contains conflicts etc), so I updated the specs to match an updated version of the library render.
This does not affect GitLab at all because
.pod
files are not being rendered anyway (see explanation above).Reassigned to @marin
Mentioned in merge request !2 (merged)
Mentioned in commit 25b13a63
Mentioned in commit 5a287084
We cannot ship gem in our codebase with failing specs
@marin perfect! thanks!