Skip to content

Commit

Permalink
mage: add unitfull target
Browse files Browse the repository at this point in the history
The target runs unit tests with a Tarantool instance integration.

Closes #54
  • Loading branch information
oleg-jukovec authored and LeonidVas committed Oct 19, 2022
1 parent 0ff842a commit 7761d1b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
skip-cache: true

- name: Unit tests
run: mage unit
run: mage unitfull

# This server starts and listen on 8084 port that is used for tests.
- name: Stop Mono server
Expand Down
15 changes: 15 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,21 @@ func Unit() error {
return sh.RunV(goExecutableName, "test", fmt.Sprintf("%s/...", packagePath))
}

// Run unit tests with a Tarantool instance integration.
func UnitFull() error {
fmt.Println("Running full unit tests...")

mg.Deps(GenerateGoCode)

if mg.Verbose() {
return sh.RunV(goExecutableName, "test", "-v", fmt.Sprintf("%s/...", packagePath),
"-tags", "integration")
}

return sh.RunV(goExecutableName, "test", fmt.Sprintf("%s/...", packagePath),
"-tags", "integration")
}

// Run integration tests.
func Integration() error {
fmt.Println("Running integration tests...")
Expand Down

0 comments on commit 7761d1b

Please sign in to comment.