Skip to content

Commit 53a21f7

Browse files
committed
add test
1 parent 5180b37 commit 53a21f7

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.github/workflows/test.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Test checkout submodule
2+
on: push
3+
jobs:
4+
linux:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- run: |
9+
mkdir test_repo
10+
cd test_repo
11+
git init
12+
cp ../test/.gitmodules .gitmodules
13+
git update-index --add --cacheinfo 160000 3446fad68fcaac29bf295ccc8a6fb56ed764f165 test
14+
git submodule sync
15+
- uses: ./
16+
with:
17+
basePath: test_repo
18+
submodulePath: test
19+
identifierFile: ${{ secrets.SUBMODULE_TOKEN }}
20+
- run: |
21+
cat ./test_repo/test/README.md
22+
windows:
23+
runs-on: windows-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- run: |
27+
mkdir test_repo
28+
cd test_repo
29+
git init
30+
cp ../test/.gitmodules .gitmodules
31+
git update-index --add --cacheinfo 160000 3446fad68fcaac29bf295ccc8a6fb56ed764f165 test
32+
git submodule sync
33+
- uses: ./
34+
with:
35+
basePath: test_repo
36+
submodulePath: test
37+
identifierFile: ${{ secrets.SUBMODULE_TOKEN }}
38+
- run: |
39+
cat ./test_repo/test/README.md
40+
macos:
41+
runs-on: macos-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- run: |
45+
mkdir test_repo
46+
cd test_repo
47+
git init
48+
cp ../test/.gitmodules .gitmodules
49+
git update-index --add --cacheinfo 160000 3446fad68fcaac29bf295ccc8a6fb56ed764f165 test
50+
git submodule sync
51+
- uses: ./
52+
with:
53+
basePath: test_repo
54+
submodulePath: test
55+
identifierFile: ${{ secrets.SUBMODULE_TOKEN }}
56+
- run: |
57+
cat ./test_repo/test/README.md

test/.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "test"]
2+
path = test
3+
url = git@github.com:Mushus/private-test-repo.git

0 commit comments

Comments
 (0)