Skip to content

Commit 6fba3b6

Browse files
committed
try to parallelise git submodule fetch
1 parent e7ce769 commit 6fba3b6

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,20 @@ jobs:
4242
--mount type=volume,source=rootmount,target=/root \
4343
--mount type=bind,source=./,target=/app \
4444
-t hjwp/obeythetestinggoat-book-tester:latest \
45-
git submodule foreach 'git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch origin'
46-
47-
# - name: check submodule branches
48-
# run: |
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 "cd /app/source/chapter_01/superlists && git status && git branch -a"
45+
git submodule foreach 'git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"'
46+
docker run --rm \
47+
--mount type=volume,source=rootmount,target=/root \
48+
--mount type=bind,source=./,target=/app \
49+
-t hjwp/obeythetestinggoat-book-tester:latest \
50+
bash -c 'git submodule status | awk "{print $2}" | xargs -I% bash -c "cd % && git fetch"
51+
52+
- name: check submodule branches
53+
run: |
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 "cd /app/source/chapter_01/superlists && git status && git branch -a"
5459
5560
- name: test chapter 1
5661
run: |

0 commit comments

Comments
 (0)