Skip to content

Commit ce9ac45

Browse files
committed
minor #13094 GitHub Actions: use docker image for CI build (bendavies)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead. Discussion ---------- GitHub Actions: use docker image for CI build This is an enhancement to #13061 I think it's beneficial to use docker when possible, which allows contributors to exactly replicate CI conditions. This PR introduces a local action to do just that. cc @OskarStark Commits ------- e059c5b GitHub Actions: use docker container for CI build
2 parents 5a9498f + e059c5b commit ce9ac45

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,22 @@ jobs:
1414

1515
runs-on: ubuntu-latest
1616

17+
container: python:3.7-alpine
18+
1719
steps:
1820
- name: "Checkout"
1921
uses: actions/checkout@v2
2022

21-
- name: "Set up Python 3.7"
22-
uses: actions/setup-python@v1
23-
with:
24-
python-version: '3.7' # Semantic version range syntax or exact version of a Python version
25-
2623
- name: "Display Python version"
2724
run: python -c "import sys; print(sys.version)"
2825

29-
- name: "Install Sphinx dependencies"
30-
run: sudo apt-get install python-dev build-essential
26+
- name: "Install Sphinx"
27+
run: pip install --user sphinx
3128

32-
- name: "Cache pip"
33-
uses: actions/cache@v2
34-
with:
35-
path: ~/.cache/pip
36-
key: ${{ runner.os }}-pip-${{ hashFiles('_build/.requirements.txt') }}
37-
restore-keys: |
38-
${{ runner.os }}-pip-
29+
- name: "Install dependencies"
30+
run: apk add --no-cache git make
3931

40-
- name: "Install Sphinx + requirements via pip"
32+
- name: "Install custom requirements via pip"
4133
run: pip install -r _build/.requirements.txt
4234

4335
- name: "Build documentation"

0 commit comments

Comments
 (0)