-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backend test based on docker-compose to workflow
- Loading branch information
1 parent
08dc5d3
commit 86d3f4a
Showing
4 changed files
with
40 additions
and
14 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
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,11 @@ | ||
FROM golang:1.22.2-alpine3.18 | ||
|
||
WORKDIR /opt/backend | ||
|
||
COPY . . | ||
|
||
RUN go get | ||
|
||
RUN go install github.com/jstemmer/go-junit-report/v2@latest | ||
|
||
ENTRYPOINT go test -v 2>&1 ./... | go-junit-report -set-exit-code > ./test-results/report.xml |
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
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,11 @@ | ||
version: "2" | ||
|
||
services: | ||
backend-test: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.test | ||
container_name: backend-test | ||
volumes: | ||
- ./test-results:/opt/backend/test-results | ||
|