mirror of
https://github.com/NixOS/nix.git
synced 2024-11-24 15:52:30 +00:00
Add gitSubmodules test to github actions
This commit is contained in:
parent
cd06193d13
commit
1e4f902b28
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -166,4 +166,4 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- run: nix build -L .#hydraJobs.tests.githubFlakes .#hydraJobs.tests.tarballFlakes
|
||||
- run: nix build -L .#hydraJobs.tests.githubFlakes .#hydraJobs.tests.tarballFlakes .#hydraJobs.tests.gitSubmodules
|
||||
|
@ -46,8 +46,24 @@
|
||||
remote.wait_for_unit("sshd")
|
||||
client.succeed(f"ssh -o StrictHostKeyChecking=no {remote.name} 'echo hello world'")
|
||||
|
||||
remote.succeed("git init bar && git -C bar config user.email foobar@example.com && git -C bar config user.name Foobar && echo test >> bar/content && git -C bar add content && git -C bar commit -m 'Initial commit'")
|
||||
client.succeed(f"git init foo && git -C foo config user.email foobar@example.com && git -C foo config user.name Foobar && git -C foo submodule add root@{remote.name}:/tmp/bar sub && git -C foo add sub && git -C foo commit -m 'Add submodule'")
|
||||
remote.succeed("""
|
||||
git init bar
|
||||
git -C bar config user.email foobar@example.com
|
||||
git -C bar config user.name Foobar
|
||||
echo test >> bar/content
|
||||
git -C bar add content
|
||||
git -C bar commit -m 'Initial commit'
|
||||
""")
|
||||
|
||||
client.succeed(f"""
|
||||
git init foo
|
||||
git -C foo config user.email foobar@example.com
|
||||
git -C foo config user.name Foobar
|
||||
git -C foo submodule add root@{remote.name}:/tmp/bar sub
|
||||
git -C foo add sub
|
||||
git -C foo commit -m 'Add submodule'
|
||||
""")
|
||||
|
||||
client.succeed("nix --flake-registry \"\" flake prefetch 'git+file:///tmp/foo?submodules=1&ref=master'")
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user