-
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.
Merge pull request #16 from Azanul/master
Test new actions and apps
- Loading branch information
Showing
20 changed files
with
1,784 additions
and
53 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,23 @@ | ||
version = 1 | ||
|
||
[[analyzers]] | ||
name = "secrets" | ||
|
||
[[analyzers]] | ||
name = "test-coverage" | ||
|
||
[[analyzers]] | ||
name = "javascript" | ||
|
||
[analyzers.meta] | ||
plugins = ["react"] | ||
environment = [ | ||
"nodejs", | ||
"cypress" | ||
] | ||
|
||
[[analyzers]] | ||
name = "go" | ||
|
||
[analyzers.meta] | ||
import_root = "github.com/Azanul/Next-Watch" |
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,46 @@ | ||
name: PR Checks | ||
|
||
on: | ||
pull_request: | ||
branches: [ prod ] | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
frontend-checks: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: frontend | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.17.x' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run linter | ||
run: npm run lint | ||
# - name: Run tests | ||
# run: npm test | ||
- name: Build | ||
run: npm run build | ||
|
||
backend-checks: | ||
runs-on: ubuntu-latest | ||
working-directory: server | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build and embed frontend | ||
working-directory: . | ||
run: make frontend | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: Install dependencies | ||
run: go mod download | ||
- name: Run tests | ||
run: go test ./... | ||
- name: Run linter | ||
uses: golangci/[email protected] |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package repository | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/Azanul/Next-Watch/internal/models" | ||
"github.com/google/uuid" | ||
"github.com/pgvector/pgvector-go" | ||
) | ||
|
||
type MovieRepositoryInterface interface { | ||
GetMovies(ctx context.Context, searchTerm string, page, pageSize int) (*MoviePage, error) | ||
GetByID(ctx context.Context, id uuid.UUID) (*models.Movie, error) | ||
GetByTitle(ctx context.Context, title string) (*models.Movie, error) | ||
GetSimilarMovies(ctx context.Context, embedding pgvector.Vector, page, pageSize int) (*MoviePage, error) | ||
Create(ctx context.Context, movie *models.Movie) error | ||
Update(ctx context.Context, movie *models.Movie) error | ||
Delete(ctx context.Context, rating *models.Rating) error | ||
} | ||
|
||
type RatingRepositoryInterface interface { | ||
GetByID(ctx context.Context, ratingID uuid.UUID) (*models.Rating, error) | ||
GetByUserAndMovie(ctx context.Context, userID, movieID uuid.UUID) (*models.Rating, error) | ||
Create(ctx context.Context, rating *models.Rating) error | ||
Update(ctx context.Context, rating *models.Rating) error | ||
Delete(ctx context.Context, ratingID uuid.UUID) (*models.Rating, error) | ||
} | ||
|
||
type UserRepositoryInterface interface { | ||
Create(ctx context.Context, user *models.User) error | ||
GetByEmail(ctx context.Context, email string) (*models.User, error) | ||
Update(ctx context.Context, user *models.User) error | ||
} |
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.