From e059c5b1cff73ed25b0a0cba22402001b11b0959 Mon Sep 17 00:00:00 2001 From: Ben Davies Date: Mon, 10 Feb 2020 13:11:49 +0000 Subject: [PATCH] GitHub Actions: use docker container for CI build --- .github/workflows/ci.yaml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 881b171ce10..8dbda8b72d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,30 +14,22 @@ jobs: runs-on: ubuntu-latest + container: python:3.7-alpine + steps: - name: "Checkout" uses: actions/checkout@v2 - - name: "Set up Python 3.7" - uses: actions/setup-python@v1 - with: - python-version: '3.7' # Semantic version range syntax or exact version of a Python version - - name: "Display Python version" run: python -c "import sys; print(sys.version)" - - name: "Install Sphinx dependencies" - run: sudo apt-get install python-dev build-essential + - name: "Install Sphinx" + run: pip install --user sphinx - - name: "Cache pip" - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('_build/.requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + - name: "Install dependencies" + run: apk add --no-cache git make - - name: "Install Sphinx + requirements via pip" + - name: "Install custom requirements via pip" run: pip install -r _build/.requirements.txt - name: "Build documentation"