diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000000..bfebdf83e4b --- /dev/null +++ b/.github/workflows/test.yaml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8a305bbba02..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: python -python: - - "3.6" - -cache: - pip: true - -env: - - TEST_SUITE=vale - - TEST_SUITE=blueberry - - TEST_SUITE=docs404 - -before_install: - - if [ $TEST_SUITE == docs404 ]; then - wget https://github.com/gohugoio/hugo/releases/download/v0.76.3/hugo_0.76.3_Linux-64bit.deb; - sudo dpkg -i hugo*.deb; - nvm install 13; - nvm use 13; - npm install; - (hugo server &); - fi - - sleep 7 - -before_script: - - git remote set-branches --add origin $TRAVIS_BRANCH - - git fetch --unshallow - - sleep 7 - -script: - - ./ci/scripts/$TEST_SUITE.sh diff --git a/ci/blueberry.py b/ci/blueberry.py index 3d9e3f68283..29a6daa0947 100644 --- a/ci/blueberry.py +++ b/ci/blueberry.py @@ -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) diff --git a/docs/guides/platform/object-storage/host-static-site-object-storage/index.md b/docs/guides/platform/object-storage/host-static-site-object-storage/index.md index bbf7101818e..931eb7fb951 100644 --- a/docs/guides/platform/object-storage/host-static-site-object-storage/index.md +++ b/docs/guides/platform/object-storage/host-static-site-object-storage/index.md @@ -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 diff --git a/package.json b/package.json index 82e85d216fa..70969d12c79 100644 --- a/package.json +++ b/package.json @@ -29,4 +29,4 @@ }, "name": "linode-docs", "version": "0.1.0" -} \ No newline at end of file +}