-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
53 lines (50 loc) · 1.33 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
stages:
- test
- deploy
variables:
GECKODRIVER_VERSION: "0.23.0"
# LUA_WEB_DRIVER_LOG_LEVEL: "notice"
test-centos7:
image: centos:7
stage: test
before_script:
- yum install -q -y epel-release
- yum install -q -y
firefox
gcc
gcc-c++
git
lua-devel
luajit
luajit-devel
luarocks
m4
make
openssl-devel
ruby
- curl -L -O https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
- tar xf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -C /usr/local/bin
- chmod +x /usr/local/bin/geckodriver
- VERSION=$(grep VERSION web-driver.lua | sed -e 's/.*"\(.*\)"/\1/g')
- cp web-driver.rockspec web-driver-${VERSION}-0.rockspec
- luarocks make web-driver-${VERSION}-0.rockspec
- rm -rf web-driver.lua web-driver
- luarocks install luaunit
script:
- luajit test/run-test.lua -v
- luajit examples/get-text-of-element.lua
- luajit examples/crawl.lua https://lua-web-driver.gitlab.io/lua-web-driver/
pages:
image: ruby:2.5
stage: deploy
before_script:
- cd docs
- gem install bundler
- bundle install
script:
- bundle exec jekyll build -d ../public
artifacts:
paths:
- public
only:
- master