39
39
40
40
steps :
41
41
- uses : actions/checkout@v4
42
+ # submodules: recursive
43
+ # fetch-depth: 0
42
44
43
45
- name : checkout submodules
44
46
shell : bash
@@ -47,48 +49,50 @@ jobs:
47
49
git submodule init
48
50
git submodule status | cut -d" " -f2 | xargs -n1 -P0 git submodule update
49
51
50
- - name : setup Git
51
- shell : bash
52
+ - name : warm up docker image
52
53
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"
61
59
62
- - name : Install apt stuff and other dependencies
63
- shell : bash
60
+ - name : uv pip install --upgrade systemwide
64
61
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 ."
77
67
78
- - name : Install Python requirements.txt globally
79
- shell : bash
68
+ - name : uv create virtualenv in mounted /app folder at .venv
80
69
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 ."
82
75
83
- - name : Install Python requirements.txt into virtualenv
84
- shell : bash
76
+ - name : git mark dirs safe (due to volume mount perms issue)
85
77
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
90
90
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 }}"
92
96
93
97
- name : Save tempdir path to an env var
94
98
if : always()
0 commit comments