3939
4040 steps :
4141 - uses : actions/checkout@v4
42+ # submodules: recursive
43+ # fetch-depth: 0
4244
4345 - name : checkout submodules
4446 shell : bash
@@ -47,48 +49,50 @@ jobs:
4749 git submodule init
4850 git submodule status | cut -d" " -f2 | xargs -n1 -P0 git submodule update
4951
50- - name : setup Git
51- shell : bash
52+ - name : warm up docker image
5253 run : |
53- git config --global user.email "[email protected] " 54- git config --global user.name "Elspeth See-Eye"
55- git config --global init.defaultBranch main
56-
57- - name : Set up Python 3.12
58- uses : actions/setup-python@v5
59- with :
60- python-version : 3.12
54+ docker run --rm \
55+ --mount type=volume,source=rootmount,target=/root \
56+ --mount type=bind,source=./,target=/app \
57+ -t hjwp/obeythetestinggoat-book-tester:latest \
58+ bash -c "echo hello world"
6159
62- - name : Install apt stuff and other dependencies
63- shell : bash
60+ - name : uv pip install --upgrade systemwide
6461 run : |
65- sudo add-apt-repository ppa:mozillateam/ppa
66- sudo apt update -y
67- sudo apt install -y \
68- asciidoctor \
69- language-pack-en \
70- ruby-coderay \
71- ruby-pygments.rb \
72- firefox-esr \
73- tree \
74- locales
75- sudo locale-gen en_GB.UTF-8
76- pip install uv
62+ docker run --rm \
63+ --mount type=volume,source=rootmount,target=/root \
64+ --mount type=bind,source=./,target=/app \
65+ -t hjwp/obeythetestinggoat-book-tester:latest \
66+ bash -c "uv pip install --system --upgrade ."
7767
78- - name : Install Python requirements.txt globally
79- shell : bash
68+ - name : uv create virtualenv in mounted /app folder at .venv
8069 run : |
81- uv pip install --system .
70+ docker run --rm \
71+ --mount type=volume,source=rootmount,target=/root \
72+ --mount type=bind,source=./,target=/app \
73+ -t hjwp/obeythetestinggoat-book-tester:latest \
74+ bash -c "uv venv && uv pip install --upgrade ."
8275
83- - name : Install Python requirements.txt into virtualenv
84- shell : bash
76+ - name : git mark dirs safe (due to volume mount perms issue)
8577 run : |
86- make .venv/bin
87-
88- - name : Run chapter test
89- shell : bash
78+ docker run --rm \
79+ --mount type=volume,source=rootmount,target=/root \
80+ --mount type=bind,source=./,target=/app \
81+ -t hjwp/obeythetestinggoat-book-tester:latest \
82+ bash -c "git config --global --add safe.directory '*'"
83+ docker run --rm \
84+ --mount type=volume,source=rootmount,target=/root \
85+ --mount type=bind,source=./,target=/app \
86+ -t hjwp/obeythetestinggoat-book-tester:latest \
87+ bash -c "cat ~/.gitconfig"
88+
89+ - name : run chapter tests
9090 run : |
91- make ${{ matrix.test_chapter }}
91+ docker run --rm \
92+ --mount type=volume,source=rootmount,target=/root \
93+ --mount type=bind,source=./,target=/app \
94+ -t hjwp/obeythetestinggoat-book-tester:latest \
95+ bash -c "make ${{ matrix.test_chapter }}"
9296
9397 - name : Save tempdir path to an env var
9498 if : always()
0 commit comments