8
8
pull_request :
9
9
10
10
jobs :
11
- chapter-tests :
11
+ chapter_tests :
12
12
runs-on : ubuntu-latest
13
13
strategy :
14
14
fail-fast : false
@@ -17,73 +17,95 @@ jobs:
17
17
test_chapter_01,
18
18
test_chapter_02_unittest,
19
19
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,
33
33
unit-test
34
34
]
35
35
36
36
steps :
37
37
- uses : actions/checkout@v4
38
+ # submodules: recursive
39
+ # fetch-depth: 0
38
40
39
41
- name : checkout submodules
40
42
shell : bash
41
43
run : |
42
44
sed -i '[email protected] :_https://github.com/_' .gitmodules
43
45
git submodule update --init --recursive
44
46
45
- - name : setup Git
46
- shell : bash
47
+ - name : pip install --upgrade to upgrade deps, system+venv
47
48
run : |
48
- git config --global user.email "[email protected] "
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 ."
56
59
57
- - name : Install apt stuff and other dependencies
58
- shell : bash
60
+ - name : git mark dirs safe (due to volume mount perms issue)
59
61
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"
72
72
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"'
77
85
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"
82
93
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
85
103
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 }}"
87
109
88
110
- name : Archive the built html files
89
111
uses : actions/upload-artifact@v4
0 commit comments