3535
3636 steps :
3737 - uses : actions/checkout@v4
38+ # submodules: recursive
39+ # fetch-depth: 0
3840
3941 - name : checkout submodules
4042 shell : bash
@@ -43,48 +45,50 @@ jobs:
4345 git submodule init
4446 git submodule status | cut -d" " -f2 | xargs -n1 -P0 git submodule update
4547
46- - name : setup Git
47- shell : bash
48+ - name : warm up docker image
4849 run : |
49- git config --global user.email "elspeth@example.com"
50- git config --global user.name "Elspeth See-Eye"
51- git config --global init.defaultBranch main
52-
53- - name : Set up Python 3.12
54- uses : actions/setup-python@v5
55- with :
56- python-version : 3.12
50+ docker run --rm \
51+ --mount type=volume,source=rootmount,target=/root \
52+ --mount type=bind,source=./,target=/app \
53+ -t hjwp/obeythetestinggoat-book-tester:latest \
54+ bash -c "echo hello world"
5755
58- - name : Install apt stuff and other dependencies
59- shell : bash
56+ - name : uv pip install --upgrade systemwide
6057 run : |
61- sudo add-apt-repository ppa:mozillateam/ppa
62- sudo apt update -y
63- sudo apt install -y \
64- asciidoctor \
65- language-pack-en \
66- ruby-coderay \
67- ruby-pygments.rb \
68- firefox-esr \
69- tree \
70- locales
71- sudo locale-gen en_GB.UTF-8
72- pip install uv
58+ docker run --rm \
59+ --mount type=volume,source=rootmount,target=/root \
60+ --mount type=bind,source=./,target=/app \
61+ -t hjwp/obeythetestinggoat-book-tester:latest \
62+ bash -c "uv pip install --system --upgrade ."
7363
74- - name : Install Python requirements.txt globally
75- shell : bash
64+ - name : uv create virtualenv in mounted /app folder at .venv
7665 run : |
77- uv pip install --system .
66+ docker run --rm \
67+ --mount type=volume,source=rootmount,target=/root \
68+ --mount type=bind,source=./,target=/app \
69+ -t hjwp/obeythetestinggoat-book-tester:latest \
70+ bash -c "uv venv && uv pip install --upgrade ."
7871
79- - name : Install Python requirements.txt into virtualenv
80- shell : bash
72+ - name : git mark dirs safe (due to volume mount perms issue)
8173 run : |
82- make .venv/bin
74+ docker run --rm \
75+ --mount type=volume,source=rootmount,target=/root \
76+ --mount type=bind,source=./,target=/app \
77+ -t hjwp/obeythetestinggoat-book-tester:latest \
78+ bash -c "git config --global --add safe.directory '*'"
79+ docker run --rm \
80+ --mount type=volume,source=rootmount,target=/root \
81+ --mount type=bind,source=./,target=/app \
82+ -t hjwp/obeythetestinggoat-book-tester:latest \
83+ bash -c "cat ~/.gitconfig"
8384
84- - name : Run chapter test
85- shell : bash
85+ - name : run chapter tests
8686 run : |
87- make ${{ matrix.test_chapter }}
87+ docker run --rm \
88+ --mount type=volume,source=rootmount,target=/root \
89+ --mount type=bind,source=./,target=/app \
90+ -t hjwp/obeythetestinggoat-book-tester:latest \
91+ bash -c "make ${{ matrix.test_chapter }}"
8892
8993 - name : Archive the built html files
9094 uses : actions/upload-artifact@v4
0 commit comments