Skip to content

Commit 9429f14

Browse files
authored
Merge pull request #8 from github/vdye/test-setup
Minor refactoring around the build/test infrastructure
2 parents 6316ccf + 46204da commit 9429f14

File tree

9 files changed

+12
-37
lines changed

9 files changed

+12
-37
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,23 @@ jobs:
1212
with:
1313
go-version: '1.19.0'
1414

15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
with:
1717
path: src/git-bundle-server
1818

19+
# TODO: when the '-C' option is available, remove the 'cd ...'
20+
# See https://github.com/golang/go/issues/50332 for more details
1921
- name: Build
2022
run: |
2123
cd $GITHUB_WORKSPACE/src/git-bundle-server
22-
GOPATH="$GITHUB_WORKSPACE/../../" go build ./cmd/git-bundle-server
23-
GOPATH="$GITHUB_WORKSPACE/../../" go build ./cmd/git-bundle-web-server
24+
go build -v ./...
2425
2526
- name: Check style
2627
run: |
2728
cd $GITHUB_WORKSPACE/src/git-bundle-server
28-
GOPATH="$GITHUB_WORKSPACE/../../" go vet ./cmd/git-bundle-server
29-
GOPATH="$GITHUB_WORKSPACE/../../" go vet ./cmd/git-bundle-web-server
29+
go vet ./...
3030
31-
# TODO: add automated tests.
31+
- name: Run unit tests
32+
run: |
33+
cd $GITHUB_WORKSPACE/src/git-bundle-server
34+
go test -v ./...

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ By running this software, you can self-host a bundle server to work with Git's
99

1010
Be sure to clone inside the `src` directory of your `GOROOT`.
1111

12-
Once there, you can build the `git-bundle-server` executable with
12+
Once there, you can build the `git-bundle-server` and `git-bundle-web-server`
13+
executables with
1314

1415
```ShellSession
15-
$ go build git-bundle-server/cmd/git-bundle-server
16+
$ go build -o . ./...
1617
```
1718

1819
## Bundle Management through CLI

cmd/git-bundle-server/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

cmd/git-bundle-web-server/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

go.mod

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
module github.com/github/git-bundle-server
22

33
go 1.19
4-
5-
require (
6-
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
7-
golang.org/x/tools v0.1.12 // indirect
8-
)

go.work

Lines changed: 0 additions & 9 deletions
This file was deleted.

internal/bundles/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

internal/core/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

internal/git/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)