-
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 more tests and guthub tests workflow
- Loading branch information
Showing
43 changed files
with
1,941 additions
and
83 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: e2e tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
e2etests: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:16.1 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 5s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
redis: | ||
image: redis:7 | ||
ports: | ||
- 6379:6379 | ||
|
||
minio: | ||
image: minio/minio:edge-cicd | ||
options: --health-cmd "curl -s http://localhost:9000/minio/health/live" | ||
env: | ||
MINIO_ROOT_USER: admin | ||
MINIO_ROOT_PASSWORD: password | ||
ports: | ||
- 9000:9000 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup db | ||
env: | ||
PGPASSWORD: postgres | ||
run: | | ||
psql -h localhost -p 5432 -U postgres -f ./docker/compose/initdb/0001_init.sql | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: install deps | ||
run: go mod download | ||
|
||
- name: run tests | ||
run: | | ||
go test -v -count=1 -cover -coverpkg=./... -coverprofile=profile.cov --tags e2e ./... | ||
go tool cover -func profile.cov |
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 @@ | ||
quiet: False | ||
disable-version-string: True | ||
with-expecter: True | ||
mockname: "Mock{{.InterfaceName}}" | ||
filename: "mock_{{.InterfaceName|lower}}_test.go" | ||
outpkg: "{{.PackageName}}" | ||
dir: "{{.InterfaceDir}}" | ||
packages: | ||
github.com/adwski/vidi/internal/api/video: | ||
interfaces: | ||
Store: {} |
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
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
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 |
---|---|---|
|
@@ -12,3 +12,6 @@ s3: | |
access_key: admin | ||
secret_key: password | ||
bucket: vidi | ||
cors: | ||
enable: true | ||
allow_origin: "*" |
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
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
Oops, something went wrong.