tests:
    stage: test
    image: registry.gitlab.com/craigbarnes/dockerfiles/lua-testing
    script:
        - make -j`nproc` local-libgumbo
        - make build-all USE_LOCAL_LIBGUMBO=1 DEBUG=1
        - make check-all USE_LOCAL_LIBGUMBO=1
#        - make clean check-luarocks-make LUAROCKS=luarocks-5.3
#        - make check-luarocks-build LUAROCKS=luarocks-5.3
        - make coverage.txt USE_LOCAL_LIBGUMBO=1
        - sed -n '/^File  *Hits .*Coverage$/,/^Total.*%$/p' coverage.txt
        - luacov-coveralls-5.3 -t "$COVERALLS_TOKEN"

pages-test:
    stage: test
    image: quay.io/craigbarnes/pandoc
    except: [master]
    script:
        - git fetch --tags
        - make -j`nproc` docs dist
        - make check-dist

pages:
    stage: deploy
    image: quay.io/craigbarnes/pandoc
    artifacts: {paths: [public]}
    only: [master]
    script:
        - git fetch --tags
        - make -j`nproc` docs dist
        - make check-dist

tests:
    stage: test
    image: registry.gitlab.com/craigbarnes/dockerfiles/lua-testing-extra
    script:
        - make -j`nproc` local-libgumbo
        - make build-all USE_LOCAL_LIBGUMBO=1 DEBUG=1
        - make check-all USE_LOCAL_LIBGUMBO=1
#        - make clean check-luarocks-make LUAROCKS=luarocks-5.3
#        - make check-luarocks-build LUAROCKS=luarocks-5.3
        - make coverage.txt USE_LOCAL_LIBGUMBO=1
        - sed -n '/^File  *Hits .*Coverage$/,/^Total.*%$/p' coverage.txt
        - luacov-coveralls-5.3 -t "$COVERALLS_TOKEN"

pages-test:
    stage: test
    image: quay.io/craigbarnes/pandoc
    except: [master]
    script:
        - git fetch --tags
        - make -j`nproc` docs dist
        - make check-dist

pages:
    stage: deploy
    image: quay.io/craigbarnes/pandoc
    artifacts: {paths: [public]}
    only: [master]
    script:
        - git fetch --tags
        - make -j`nproc` docs dist
        - make check-dist

Use lua-testing-extra image instead of lua-testing to run CI tests
Use lua-testing-extra image instead of lua-testing to run CI tests

The tests download and statically compile libgumbo, which requires
autotools and g++ to be installed.
