88 pull_request :
99
1010jobs :
11- chapter-tests :
11+ chapter_tests :
1212 runs-on : ubuntu-latest
1313 strategy :
1414 fail-fast : false
@@ -17,73 +17,95 @@ jobs:
1717 test_chapter_01,
1818 test_chapter_02_unittest,
1919 test_chapter_03_unit_test_first_view,
20- test_chapter_04_philosophy_and_refactoring,
21- test_chapter_05_post_and_database,
22- test_chapter_06_explicit_waits_1,
23- test_chapter_07_working_incrementally,
24- test_chapter_08_prettification,
25- # test_chapter_09_docker,
26- # test_chapter_10_production_readiness,
27- # test_chapter_11_ansible,
28- test_chapter_12_organising_test_files,
29- test_chapter_13_database_layer_validation,
30- test_chapter_14_simple_form,
31- # test_chapter_15_advanced_forms,
32- test_chapter_16_javascript,
20+ # test_chapter_04_philosophy_and_refactoring,
21+ # test_chapter_05_post_and_database,
22+ # test_chapter_06_explicit_waits_1,
23+ # test_chapter_07_working_incrementally,
24+ # test_chapter_08_prettification,
25+ # # test_chapter_09_docker,
26+ # # test_chapter_10_production_readiness,
27+ # # test_chapter_11_ansible,
28+ # test_chapter_12_organising_test_files,
29+ # test_chapter_13_database_layer_validation,
30+ # test_chapter_14_simple_form,
31+ # # test_chapter_15_advanced_forms,
32+ # test_chapter_16_javascript,
3333 unit-test
3434 ]
3535
3636 steps :
3737 - uses : actions/checkout@v4
38+ # submodules: recursive
39+ # fetch-depth: 0
3840
3941 - name : checkout submodules
4042 shell : bash
4143 run : |
4244 sed -i 's_git@github.com:_https://github.com/_' .gitmodules
4345 git submodule update --init --recursive
4446
45- - name : setup Git
46- shell : bash
47+ - name : pip install --upgrade to upgrade deps, system+venv
4748 run : |
48- git config --global user.email "elspeth@example.com"
49- git config --global user.name "Elspeth See-Eye"
50- git config --global init.defaultBranch main
51-
52- - name : Set up Python 3.12
53- uses : actions/setup-python@v5
54- with :
55- python-version : 3.12
49+ docker run --rm \
50+ --mount type=volume,source=rootmount,target=/root \
51+ --mount type=bind,source=./,target=/app \
52+ -t hjwp/obeythetestinggoat-book-tester:latest \
53+ bash -c "uv pip install --system --upgrade ."
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 "uv pip install --upgrade ."
5659
57- - name : Install apt stuff and other dependencies
58- shell : bash
60+ - name : git mark dirs safe (due to volume mount perms issue)
5961 run : |
60- sudo add-apt-repository ppa:mozillateam/ppa
61- sudo apt update -y
62- sudo apt install -y \
63- asciidoctor \
64- language-pack-en \
65- ruby-coderay \
66- ruby-pygments.rb \
67- firefox-esr \
68- tree \
69- locales
70- sudo locale-gen en_GB.UTF-8
71- 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 "git config --global --add safe.directory '*'"
67+ docker run --rm \
68+ --mount type=volume,source=rootmount,target=/root \
69+ --mount type=bind,source=./,target=/app \
70+ -t hjwp/obeythetestinggoat-book-tester:latest \
71+ bash -c "cat ~/.gitconfig"
7272
73- - name : Install Python requirements.txt globally
74- shell : bash
75- run : |
76- uv pip install --system .
73+ # - name: fetch submodule branches
74+ # run: |
75+ # docker run --rm \
76+ # --mount type=volume,source=rootmount,target=/root \
77+ # --mount type=bind,source=./,target=/app \
78+ # -t hjwp/obeythetestinggoat-book-tester:latest \
79+ # git submodule foreach 'git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"'
80+ # docker run --rm \
81+ # --mount type=volume,source=rootmount,target=/root \
82+ # --mount type=bind,source=./,target=/app \
83+ # -t hjwp/obeythetestinggoat-book-tester:latest \
84+ # bash -c 'git submodule status | cut -d" " -f3 | xargs -P0 -I% bash -c "cd % && git fetch"'
7785
78- - name : Install Python requirements.txt into virtualenv
79- shell : bash
80- run : |
81- make .venv/bin
86+ # - name: check submodule branches
87+ # run: |
88+ # docker run --rm \
89+ # --mount type=volume,source=rootmount,target=/root \
90+ # --mount type=bind,source=./,target=/app \
91+ # -t hjwp/obeythetestinggoat-book-tester:latest \
92+ # bash -c "cd /app/source/chapter_01/superlists && git status && git branch -a"
8293
83- - name : Run chapter test
84- shell : bash
94+ # - name: test chapter 1
95+ # run: |
96+ # docker run --rm \
97+ # --mount type=volume,source=rootmount,target=/root \
98+ # --mount type=bind,source=./,target=/app \
99+ # -t hjwp/obeythetestinggoat-book-tester:latest \
100+ # bash -c "make test_chapter_01"
101+
102+ - name : run chapter tests
85103 run : |
86- make ${{ matrix.test_chapter }}
104+ docker run --rm \
105+ --mount type=volume,source=rootmount,target=/root \
106+ --mount type=bind,source=./,target=/app \
107+ -t hjwp/obeythetestinggoat-book-tester:latest \
108+ bash -c "make ${{ matrix.test_chapter }}"
87109
88110 - name : Archive the built html files
89111 uses : actions/upload-artifact@v4
0 commit comments