tercul-backend/internal/adapters/graphql
Damir Mukimov 24d48396ca
Update GitHub Actions workflows to 2025 best practices (#29)
* Fix workflow triggers to use 'main' branch instead of 'master'

* Switch to semantic version tags for GitHub Actions instead of SHAs for better maintainability

* Fix golangci-lint by adding go mod tidy and specifying paths ./... for linting

* feat: Restructure workflows following Single Responsibility Principle

- Remove old monolithic workflows (ci.yml, ci-cd.yml, cd.yml)
- Add focused workflows: lint.yml, test.yml, build.yml, security.yml, docker-build.yml, deploy.yml
- Each workflow has a single, clear responsibility
- Follow 2025 best practices with semantic versioning, OIDC auth, build attestations
- Add comprehensive README.md with workflow documentation
- Configure Dependabot for automated dependency updates

Workflows now run independently and can be triggered separately for better CI/CD control.

* fix: Resolve CI/CD workflow failures and GraphQL integration test issues

- Fix Application struct mismatch in application_builder.go
- Add global config.Cfg variable and BleveIndexPath field
- Regenerate GraphQL code to fix ProcessArgField errors
- Add search.InitBleve() call in main.go
- Fix all errcheck issues (12 total) in main.go files and test files
- Fix staticcheck issues (deprecated handler.NewDefaultServer, tagged switch)
- Remove all unused code (50 unused items including mock implementations)
- Fix GraphQL 'transport not supported' error in integration tests
- Add comprehensive database cleanup for integration tests
- Update GraphQL server setup with proper error presenter

* feat: Complete backend CI/CD workflow setup

- Add comprehensive GitHub Actions workflows for Go backend
- Build workflow with binary compilation and attestation
- Test workflow with coverage reporting and race detection
- Lint workflow with golangci-lint and security scanning
- Docker build workflow with multi-architecture support
- Deploy workflow for production deployment
- Security workflow with vulnerability scanning
- All workflows follow Single Responsibility Principle
- Use semantic versioning and latest action versions
- Enable security features: OIDC auth, attestations, minimal permissions

* fix: correct Go build path to ./cmd/api

- Fix build workflow to target ./cmd/api instead of ./cmd
- The main.go file is located in cmd/api/ subdirectory

* fix: correct Dockerfile build path to ./cmd/api

- Fix Docker build to target ./cmd/api instead of root directory
- The main.go file is located in cmd/api/ subdirectory
2025-11-27 07:08:08 +01:00
..
model Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00
.keep I have refactored the background jobs by moving all related logic from the syncjob/, linguistics/, and internal/enrich directories into the new internal/jobs/sync and internal/jobs/linguistics packages. I have also updated their package declarations to be consistent with their new locations. 2025-09-02 15:02:04 +00:00
analytics_service_mock_test.go feat: Complete large-scale refactor and prepare for production 2025-10-07 11:09:37 +00:00
auth_mutations_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
author_resolvers_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
binding.go feat(analytics): Enhance analytics capabilities 2025-09-07 19:26:51 +00:00
book_resolvers_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
errors.go feat: Complete all pending tasks from TASKS.md 2025-10-05 05:26:27 +00:00
generated.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
graphql_test_utils_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
helpers.go This commit introduces goose as the database migration tool for the project, replacing the previous gorm.AutoMigrate system. It also includes several code quality improvements identified during the refactoring process. 2025-10-03 02:52:01 +00:00
integration_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
like_repo_mock_test.go feat: Complete large-scale refactor and prepare for production 2025-10-07 11:09:37 +00:00
like_resolvers_unit_test.go feat: Complete all pending tasks from TASKS.md 2025-10-05 05:26:27 +00:00
resolver.go refactor: Refactor GraphQL tests to use mock-based unit tests 2025-10-03 09:21:41 +00:00
schema.graphqls Fix: Correct authorization logic in integration tests 2025-10-04 23:48:44 +00:00
schema.resolvers.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
translation_resolvers_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
user_mutations_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
user_resolvers_unit_test.go feat(testing): Increase test coverage and fix authz bugs 2025-10-09 07:03:45 +00:00
validation.go feat: Implement production-ready API patterns 2025-10-04 18:16:08 +00:00
work_repo_mock_test.go feat: Complete large-scale refactor and prepare for production 2025-10-07 11:09:37 +00:00
work_resolvers_test.go Update GitHub Actions workflows to 2025 best practices (#29) 2025-11-27 07:08:08 +01:00
work_resolvers_unit_test.go feat(testing): Increase test coverage and fix authz bugs 2025-10-09 07:03:45 +00:00