mirror of
https://github.com/pi-hole/docs.git
synced 2026-02-15 07:26:03 +00:00
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
|
|
env:
|
|
CI: true
|
|
NODE: 12.x
|
|
PYTHON_VERSION: "3.7"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "${{ env.PYTHON_VERSION }}"
|
|
architecture: "x64"
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "${{ env.NODE }}"
|
|
|
|
- name: Cache Python dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/requirements.txt') }}
|
|
restore-keys: ${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
- run: pip install --upgrade wheel
|
|
|
|
- name: Install Python dependencies
|
|
run: python3 -m pip install -r requirements.txt
|
|
|
|
- name: Install npm dependencies
|
|
run: npm ci
|
|
|
|
- name: Build docs
|
|
run: mkdocs build
|
|
|
|
- name: Test
|
|
run: npm test
|