-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Include a low number of tests.
- Loading branch information
1 parent
7962afd
commit 3642565
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,11 @@ jobs: | |
with: | ||
go-version: 1.12 | ||
id: go | ||
|
||
- name: Setup BATS | ||
uses: mig4/[email protected] | ||
with: | ||
bats-version: 1.1.0 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
@@ -30,6 +35,10 @@ jobs: | |
run: | | ||
go build . | ||
./gitql -v | ||
- name: Run function tests | ||
run: bats --tap ./tests | ||
|
||
- uses: actions/upload-artifact@master | ||
name: Generating artifact | ||
with: | ||
|
@@ -45,6 +54,11 @@ jobs: | |
with: | ||
go-version: 1.12 | ||
id: go | ||
|
||
- name: Setup BATS | ||
uses: mig4/[email protected] | ||
with: | ||
bats-version: 1.1.0 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
@@ -59,6 +73,10 @@ jobs: | |
run: | | ||
go build . | ||
./gitql -v | ||
- name: Run function tests | ||
run: bats --tap ./tests | ||
|
||
- uses: actions/upload-artifact@master | ||
name: Generating artifact | ||
with: | ||
|
@@ -75,6 +93,11 @@ jobs: | |
go-version: 1.12 | ||
id: go | ||
|
||
- name: Setup BATS | ||
uses: mig4/[email protected] | ||
with: | ||
bats-version: 1.1.0 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
|
@@ -87,6 +110,9 @@ jobs: | |
go build . | ||
.\gitql.exe -v | ||
- name: Run function tests | ||
run: bats --tap ./tests | ||
|
||
- uses: actions/upload-artifact@master | ||
name: Generating artifact | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ func main() { | |
}, | ||
&cli.BoolFlag{ | ||
Name: "show-tables", | ||
Aliases: []string{"s"}, | ||
Hidden: true, | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bats | ||
|
||
@test "Check version" { | ||
result="$(./gitql -v)" | ||
[ "$result" == "Gitql 2.1.0" ] | ||
} | ||
|
||
@test "Check table commits on -s" { | ||
result="$(./gitql -s | grep commits)" | ||
[ "$result" == "commits" ] | ||
} | ||
|
||
@test "Check table refs on -s" { | ||
result="$(./gitql -s | grep refs)" | ||
[ "$result" == "refs" ] | ||
} | ||
|
||
@test "Check table tags on -s" { | ||
result="$(./gitql -s | grep tags)" | ||
[ "$result" == "tags" ] | ||
} | ||
|
||
@test "Check table branches on -s" { | ||
result="$(./gitql -s | grep branches)" | ||
[ "$result" == "branches" ] | ||
} |