4343
4444 steps :
4545 - uses : actions/checkout@v4
46+ # submodules: recursive
47+ # fetch-depth: 0
4648
4749 - name : checkout submodules
4850 shell : bash
@@ -51,46 +53,50 @@ jobs:
5153 git submodule init
5254 git submodule status | cut -d" " -f2 | xargs -n1 -P0 git submodule update
5355
54- - name : setup Git
55- shell : bash
56+ - name : warm up docker image
5657 run : |
57- git config --global user.email "elspeth@example.com"
58- git config --global user.name "Elspeth See-Eye"
59- git config --global init.defaultBranch main
60-
61- - name : Set up Python 3.12
62- uses : actions/setup-python@v5
63- with :
64- python-version : 3.12
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 "echo hello world"
6563
66- - name : Install apt stuff and other dependencies
67- shell : bash
64+ - name : uv pip install --upgrade systemwide
6865 run : |
69- sudo add-apt-repository ppa:mozillateam/ppa
70- sudo apt update -y
71- sudo apt install -y \
72- asciidoctor \
73- language-pack-en \
74- ruby-coderay \
75- ruby-pygments.rb \
76- firefox-esr \
77- tree
78- pip install uv
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 pip install --system --upgrade ."
7971
80- - name : Install Python requirements.txt globally
81- shell : bash
72+ - name : uv create virtualenv in mounted /app folder at .venv
8273 run : |
83- uv pip install --system .
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 "uv venv && uv pip install --upgrade ."
8479
85- - name : Install Python requirements.txt into virtualenv
86- shell : bash
80+ - name : git mark dirs safe (due to volume mount perms issue)
8781 run : |
88- make .venv/bin
89-
90- - name : Run chapter test
91- shell : bash
82+ docker run --rm \
83+ --mount type=volume,source=rootmount,target=/root \
84+ --mount type=bind,source=./,target=/app \
85+ -t hjwp/obeythetestinggoat-book-tester:latest \
86+ bash -c "git config --global --add safe.directory '*'"
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 "cat ~/.gitconfig"
92+
93+ - name : run chapter tests
9294 run : |
93- make ${{ matrix.test_chapter }}
95+ docker run --rm \
96+ --mount type=volume,source=rootmount,target=/root \
97+ --mount type=bind,source=./,target=/app \
98+ -t hjwp/obeythetestinggoat-book-tester:latest \
99+ bash -c "make ${{ matrix.test_chapter }}"
94100
95101 - name : Save tempdir path to an env var
96102 if : always()
0 commit comments