Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: CI Tests

on: [pull_request]

jobs:
blueberry:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.6.x'
architecture: 'x64'
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('./ci/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./ci/requirements.txt
- name: blueberry
run: |
python ./ci/blueberry.py

vale:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Get Changed Files
id: get_changed_files
uses: lots0logs/gh-action-get-changed-files@2.1.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Vale
uses: errata-ai/vale-action@v1.3.0
with:
styles: |
./ci/vale/styles
files: '${{ steps.get_changed_files.outputs.all }}'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

docs404:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.6.x'
architecture: 'x64'
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('./ci/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./ci/requirements.txt
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies (Node)
run: npm install
- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.79.0'
- name: Start Hugo server
run: hugo server&
- name: Wait for server
run: sleep 20
- name: Run tests
run: python ./ci/docs404.py
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion ci/blueberry.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,10 @@ def readfile(filename, section=None):
# WARNING: Implicitly converts dates to datetime
return post.metadata

except (LookupError, SyntaxError, UnicodeError, scanner.ScannerError):
except (LookupError, SyntaxError, UnicodeError, scanner.ScannerError) as err:
# Return Error; require utf-8
# Should this sys.exit(1) here?
print(err)
print(f"{filename} caused the Blueberry script to crash.")
sys.exit(1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ slug: host-static-site-object-storage
author:
name: Linode Community
email: docs@linode.com
description: "Host a Static Site using Linode\'s Object Storage."
description: "Host a Static Site using Linode's Object Storage."
keywords: ['hugo','static site','object storage']
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
published: 2019-04-09
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
},
"name": "linode-docs",
"version": "0.1.0"
}
}