Skip to content

Commit 13de7bb

Browse files
authored
CI testing and Travis integration
* Remove links from README * Add html-proofer to gem * Add travis configuration * Link to script called cibuild.sh * SSL fix * Try libcurl4-openssl-dev * Cache bundler
1 parent 909fdef commit 13de7bb

File tree

6 files changed

+40
-2
lines changed

6 files changed

+40
-2
lines changed

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: ruby
2+
rvm:
3+
- 2.4.0
4+
5+
# Assume bundler is being used, therefore
6+
# the `install` step will run `bundle install` by default.
7+
script: ./script/cibuild.sh
8+
9+
env:
10+
global:
11+
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
12+
13+
# Upgrade the SSL otherwise outwards connections will fail
14+
addons:
15+
apt:
16+
packages:
17+
- libcurl4-openssl-dev
18+
19+
sudo: false # route your build to the container-based infrastructure for a faster build
20+
21+
# Cache the budler results so repeat builds get some speed
22+
cache: bundler

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
source "https://rubygems.org"
22
gem 'github-pages', group: :jekyll_plugins
3+
gem 'html-proofer'

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ $ bundle install
1818
```bash
1919
$ bundle exec jekyll serve
2020
```
21-
2. You can now view the website locally on <http://127.0.0.1:4000>
21+
2. You can now view the website locally on `http://localhost:4000`
2222

23-
The server will rebuild the site every time a file changes, with the exception of [`_config.yml`](_config.yml).
23+
The server will rebuild the site every time a file changes, with the exception of `_config.yml`.
2424

2525
# License
2626

_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
# Jekyll plugins that are supported by GitHub pages
55
plugins:
66
- jekyll-remote-theme
7+
- jekyll-feed
78

89
# Also render the README to HTML even if there is an index.md
910
include:
1011
- README.md
1112

13+
# Exclude the `vendor` folder created by Travis
14+
exclude:
15+
- vendor
16+
1217
# Use the Foundation For Public Code Jekyll theme
1318
remote_theme: publiccodenet/jekyll-theme

script/cibuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
./script/test.sh

script/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -e # halt script on error
3+
4+
# Build the site
5+
bundle exec jekyll build
6+
7+
# Check for broken links and missing alt tags, ignore edit links to GitHub as they might not exist yet
8+
bundle exec htmlproofer --url-ignore "/github.com/(.*)/edit/" ./_site

0 commit comments

Comments
 (0)