Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Iteration #1

Merged
merged 37 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1607464
media processor and store, api drafts
adwski Jan 6, 2024
6fe6e5e
add common api store and user store
adwski Jan 7, 2024
0df5482
add user request validation
adwski Jan 7, 2024
4093a6e
add service configuration, add userapi service
adwski Jan 8, 2024
4805cfb
add videoapi and session store
adwski Jan 9, 2024
4995424
fix err wrap
adwski Jan 9, 2024
98359ee
add videoapi client, uploader service, notificator, fasthttp server
adwski Jan 10, 2024
e4ec3db
add uploader and streamer apps, add ristretto cache to session store
adwski Jan 11, 2024
3088e60
add processor, add cli, refactor segmenter
adwski Jan 12, 2024
5129703
refactor compose, fix userapi
adwski Jan 13, 2024
8c5703d
fixes and refactoring
adwski Jan 13, 2024
f6eddc4
add token create cmd, add happy path, fix bugs
adwski Jan 15, 2024
b6a9b22
add dash player, update happy path and readme
adwski Jan 16, 2024
5aec29a
remove unused nginx mount
adwski Jan 16, 2024
09be886
add comments
adwski Jan 17, 2024
35556a0
expant video section to fill viewport
adwski Jan 17, 2024
e1f2e88
customize default echo middleware
adwski Jan 18, 2024
2c8ee68
rm manual password salting, minor fixes and refactor
adwski Jan 26, 2024
8b5504c
fix case in sql
adwski Jan 26, 2024
9970646
add generator tests
adwski Jan 26, 2024
c16d0ee
add logger tests
adwski Jan 26, 2024
3b4f3bc
add auth tests, server tests, user e2e tests
adwski Jan 29, 2024
970c070
add vide e2e tests and getall in video user-side api
adwski Jan 30, 2024
f905db6
rm unused funcs
adwski Jan 30, 2024
01f431b
add more tests and guthub tests workflow
adwski Jan 31, 2024
1528b94
add fs output to test step
adwski Jan 31, 2024
1f8910f
fix testfiles dir
adwski Jan 31, 2024
11673d2
add coverage badge, update readme
adwski Jan 31, 2024
dac453a
fix push branch
adwski Jan 31, 2024
a34add9
rm github-push-action
adwski Jan 31, 2024
18595c0
specify push branch
adwski Jan 31, 2024
cf7c86f
try checkout -t -b
adwski Jan 31, 2024
a98c893
add ref to checkout action
adwski Jan 31, 2024
9108468
chore: update coverage badge
adwski Jan 31, 2024
c8ad397
update verify-changed-files
adwski Jan 31, 2024
b39b138
fix viperEC tests and videostore getall error
adwski Feb 5, 2024
9489e1e
increase MaxRequestBodySize for media services
adwski Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
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
with:
ref: ${{ github.head_ref }}

- 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
go tool cover -func=profile.cov -o=coverage.out

- name: coverage badge
uses: tj-actions/coverage-badge-go@v2
with:
filename: coverage.out

- name: verify changed files
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
with:
files: README.md

- name: push badge
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "chore: update coverage badge"
git push
25 changes: 25 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: golangci-lint
on:
push:
branches:
- master
- main
pull_request:

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
33 changes: 33 additions & 0 deletions .github/workflows/statictest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: go vet test

on:
pull_request:
push:
branches:
- main

jobs:
statictest:
runs-on: ubuntu-latest
container: golang:1.21
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Download statictest binary
uses: robinraju/[email protected]
with:
repository: Yandex-Practicum/go-autotests
latest: true
fileName: statictest
out-file-path: .tools
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup autotest binary
run: |
chmod -R +x $GITHUB_WORKSPACE/.tools/statictest
mv $GITHUB_WORKSPACE/.tools/statictest /usr/local/bin/statictest

- name: Run statictest
run: |
go vet -vettool=$(which statictest) ./...
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/

# IDEs directories
.idea
.vscode

# Reports
report.xml
profile.cov
coverage.html

.DS_Store

output
Loading
Loading