Skip to content

Commit 425fb58

Browse files
committed
test: configure for github actions CI
1 parent 245cf89 commit 425fb58

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ jobs:
2525
uses: actions-rs/cargo@v1
2626
with:
2727
command: build
28-
- name: Setup Git
29-
run: |
30-
git --version
31-
git config user.name "GitHub Actions Bot"
32-
git config user.email "<>"
3328
- name: Run tests
3429
uses: actions-rs/cargo@v1
3530
with:

tests/run.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,31 @@ fn initialize(repository: &str, branch: &str, pull_requests: &[&str], patches: &
1515
.output()
1616
.expect("git init failed");
1717

18+
std::fs::write(temp_dir.path().join("file.txt"), "content").expect("writing file.txt failed");
19+
20+
Command::new("git")
21+
.args(["config", "user.name", "GitHub Actions"])
22+
.current_dir(temp_dir.path())
23+
.output()
24+
.expect("git config user.name failed");
25+
26+
Command::new("git")
27+
.args(["config", "user.email", "[email protected]"])
28+
.current_dir(temp_dir.path())
29+
.output()
30+
.expect("git config user.email failed");
31+
32+
Command::new("git")
33+
.args(["add", "README.md"])
34+
.current_dir(temp_dir.path())
35+
.output()
36+
.expect("git add README.md failed");
37+
38+
Command::new("git")
39+
.args(["commit", "-m", "Initial commit with README"])
40+
.current_dir(temp_dir.path())
41+
.output()
42+
.expect("git commit failed");
1843
copy_dir("tests/fixtures/patches", temp_dir.path().join(".patchy")).expect("copy_dir failed");
1944

2045
std::fs::write(

0 commit comments

Comments
 (0)