File tree 2 files changed +33
-15
lines changed
2 files changed +33
-15
lines changed Original file line number Diff line number Diff line change 7
7
- uses : actions/checkout@v4
8
8
with :
9
9
fetch-depth : 0
10
- - name : Create local branches for tests
11
- run : |
12
- for branch in test-root test-module-{a,b,c}; do
13
- git branch --track "$branch" "origin/$branch"
14
- done
15
10
- name : Build
16
11
run : cargo +stable build --verbose
17
12
- name : Run tests
24
19
- uses : actions/checkout@v4
25
20
with :
26
21
fetch-depth : 0
27
- - name : Create local branches for tests
28
- run : |
29
- for branch in test-root test-module-{a,b,c}; do
30
- git branch --track "$branch" "origin/$branch"
31
- done
32
22
- name : Build
33
23
run : cargo +nightly build --verbose
34
24
- name : Run tests
Original file line number Diff line number Diff line change @@ -28,19 +28,47 @@ fn test_in_external_clone() {
28
28
let target_dir = target_dir. join ( "tests_target" ) ;
29
29
30
30
let_assert ! ( Ok ( result) = std:: process:: Command :: new( "git" )
31
- . arg( "-c" )
32
- . arg( "protocol.file.allow=always" )
33
31
. arg( "clone" )
34
32
. arg( "--quiet" )
35
- . arg( "--recurse-submodules" )
36
- . arg( "-b" )
37
- . arg( "test-root" )
38
33
. arg( ( lib_dir) . join( ".." ) )
39
34
. arg( tempdir. path( ) )
40
35
. status( )
41
36
) ;
42
37
assert ! ( result. success( ) , "git clone: {result}" ) ;
43
38
39
+ let_assert ! ( Ok ( result) = std:: process:: Command :: new( "git" )
40
+ . current_dir( & tempdir)
41
+ . arg( "-c" )
42
+ . arg( "protocol.file.allow=always" )
43
+ . arg( "fetch" )
44
+ . arg( "--quiet" )
45
+ . arg( "origin" )
46
+ . arg( "+refs/remotes/origin/test-*:refs/heads/test-*" )
47
+ . status( )
48
+ ) ;
49
+ assert ! ( result. success( ) , "git fetch: {result}" ) ;
50
+
51
+ let_assert ! ( Ok ( result) = std:: process:: Command :: new( "git" )
52
+ . current_dir( & tempdir)
53
+ . arg( "switch" )
54
+ . arg( "--quiet" )
55
+ . arg( "test-root" )
56
+ . status( )
57
+ ) ;
58
+ assert ! ( result. success( ) , "git fetch: {result}" ) ;
59
+
60
+ let_assert ! ( Ok ( result) = std:: process:: Command :: new( "git" )
61
+ . current_dir( & tempdir)
62
+ . arg( "-c" )
63
+ . arg( "protocol.file.allow=always" )
64
+ . arg( "submodule" )
65
+ . arg( "--quiet" )
66
+ . arg( "update" )
67
+ . arg( "--init" )
68
+ . status( )
69
+ ) ;
70
+ assert ! ( result. success( ) , "git fetch: {result}" ) ;
71
+
44
72
let_assert ! ( Ok ( result) = std:: process:: Command :: new( "cargo" )
45
73
. current_dir( & tempdir)
46
74
. arg( "add" )
You can’t perform that action at this time.
0 commit comments