Skip to content

Commit

Permalink
Merge pull request #6 from DennisTheMenace780/CLEANUP/trying-to-fix-s…
Browse files Browse the repository at this point in the history
…ubmodules

fix url
  • Loading branch information
DennisTheMenace780 authored Oct 11, 2023
2 parents c04b9cd + fcae27c commit 0180b7b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
with:
go-version: '1.21.x'

- name: Init and update submodules
run: git submodule update --init --recursive
- name: Init testdata/TestRepo repository
run: ./scripts/create_test_repo.sh

- name: Check if repo was created
run: ls -la testdata/TestRepo

- name: Build Step
run: go build -v ./...
Expand Down
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "testdata/TestRepo"]
path = testdata/TestRepo
url = ./testdata/TestRepo
url = https://github.com/DennisTheMenace780/TabbyCat/blob/master/testdata/TestRepo.git

1 change: 0 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func TestRepo(t *testing.T) {
t.Error("Error reading from FinalOutput", err)
}
teatest.RequireEqualOutput(t, out)

}

func TestOutput(t *testing.T) {
Expand Down
25 changes: 25 additions & 0 deletions scripts/create_test_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Step 1: Create a directory in testdata/TestRepo2
mkdir -p testdata/TestRepo

# Step 2: Change directories into TestRepo2
cd testdata/TestRepo || exit

# Step 3: Initialize a Git repository
git init

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

# Step 4: Create a file called file.txt with "hello world" in it
echo "hello world" > file.txt

# Optionally, you can add and commit the file to the Git repository:
git add file.txt && git commit -m "Inital Commit"

count=1
while [ $count -lt 4 ]; do
git checkout -b "branch-$count"
count=$((count + 1))
done

0 comments on commit 0180b7b

Please sign in to comment.