Skip to content

Commit

Permalink
Merge branch 'main' into feat443-typed-attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
helderbetiol committed Apr 24, 2024
2 parents 4d71e44 + 279a399 commit 23a83fa
Show file tree
Hide file tree
Showing 57 changed files with 7,941 additions and 1,024 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/api-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,29 @@ jobs:
with:
go-version: 1.21

- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest

- name: Create MongoDB Container
run: cd ../deploy/docker && make test_api

- name: Build
run: make

- name: Test
run: go test -p 1 ./...
run: gotestsum --junitfile tests-api.xml -- -coverpkg=./... -coverprofile=coverage_api.out -p 1 ./...

- name: Log Test Coverage
run: go tool cover -func coverage_api.out | grep total

- name: Test Report
uses: dorny/test-reporter@v1
if: always() # run this step even if previous steps failed
with:
name: API Tests Report # Name of the check run which will be created
path: ./API/tests-api.xml # Path to test results
reporter: java-junit # Format of test results
- uses: actions/upload-artifact@v3
with:
name: coverage
path: ./API/coverage_api.out
20 changes: 19 additions & 1 deletion .github/workflows/cli-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,27 @@ jobs:

- name: Checkout code
uses: actions/checkout@v4

- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest

- name: Build
run: make

- name: Test
run: go test ./...
run: gotestsum --junitfile tests-cli.xml -- -coverprofile=coverage_cli.out -p 1 `go list ./... | grep -v ./readline | grep -v ./mocks`

- name: Log Test Coverage
run: go tool cover -func coverage_cli.out | grep total

- name: Test Report
uses: dorny/test-reporter@v1
if: always() # run this step even if previous steps failed
with:
name: CLI Tests Report # Name of the check run which will be created
path: ./CLI/tests-cli.xml # Path to test results
reporter: java-junit # Format of test results
- uses: actions/upload-artifact@v3
with:
name: coverage_cli
path: ./CLI/coverage_cli.out
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ deploy/mdb/*
*.DS_Store
API/.env
gin-bin
API/coverage

# CLI Ignore
.idea/
Expand All @@ -22,6 +23,7 @@ cli.mac
*.ocli
log.txt
unitylog.txt
CLI/coverage

# APP Ignore
deploy/docker/*.env
Expand Down
File renamed without changes.
Loading

0 comments on commit 23a83fa

Please sign in to comment.