Commit Graph

39 Commits

Author SHA1 Message Date
Gitea Actions d8fb1b20d2 chore: bump version to v0.1.13 2026-04-27 03:57:11 +00:00
Gitea Actions 72d4b85970 chore: bump version to v0.1.12 2026-04-27 03:40:52 +00:00
Gitea Actions 7a7b4dd122 chore: bump version to v0.1.11 2026-04-27 03:16:22 +00:00
david 926c6dfbec chore: update dependencies
Build CI Images / build-ci-base (push) Failing after 26s
Release / release (push) Failing after 14s
Fixes #16

Updated packages:
- @prisma/adapter-pg: 7.6.0 -> 7.8.0
- @prisma/client: 7.6.0 -> 7.8.0
- better-auth: 1.5.6 -> 1.6.9
- next: 16.2.1 -> 16.2.4
- prisma: 7.6.0 -> 7.8.0
- react: 19.2.4 -> 19.2.5
- react-dom: 19.2.4 -> 19.2.5
- @playwright/test: 1.58.2 -> 1.59.1
- tailwindcss: 4.2.2 -> 4.2.4
- react-hook-form: 7.72.0 -> 7.74.0
- And 74 other packages

All 27 Cucumber scenarios pass after update.
2026-04-27 03:14:44 +00:00
Gitea Actions 57b2bb760e chore: bump version to v0.1.10 2026-04-27 03:14:16 +00:00
Gitea Actions 48730fcf26 chore: bump version to v0.1.9 2026-04-27 02:39:24 +00:00
Gitea Actions 2759c08a96 chore: bump version to v0.1.8 2026-04-27 02:35:45 +00:00
Gitea Actions c90676242c chore: bump version to v0.1.7 2026-04-27 02:13:55 +00:00
david bb6be245b7 feat: Implement tournament schedule tab and fix E2E tests (#27)
Release / release (push) Failing after 9s
Build CI Images / build-ci-base (push) Failing after 18s
## Summary

This PR implements the tournament schedule tab functionality and fixes all remaining E2E test failures.

### Changes Included

1. **Tournament Schedule Feature**
   - Added tournament schedule page at `/admin/tournaments/[id]/schedule`
   - Implemented "Generate Schedule" button functionality
   - Added schedule generation logic for round-robin tournaments

2. **E2E Test Fixes**
   - Fixed database connection issues in production builds
   - Improved test reliability with better error handling and debugging
   - Updated test infrastructure to use environment variables instead of hardcoded values

3. **CI/CD Updates**
   - Added E2E test job to PR workflow
   - Configured tests to run against development database
   - Moved database password to Gitea secrets

4. **Code Quality**
   - Removed hardcoded passwords from codebase
   - Improved Prisma client configuration
   - Enhanced authentication and navigation components

### Test Results
All 16 E2E test scenarios are now passing:
- Authentication tests: 
- Registration tests: 
- Tournament schedule tests: 
- Player schedule tests: 
- Admin navigation tests: 

### Database Configuration
- Tests run against `euchre_camp_dev` database
- Production builds use environment variables for database configuration
- Database password stored in Gitea secrets as `DB_PASSWORD`

### CI Pipeline
The PR workflow now includes:
1. Unit tests
2. E2E tests (using production build)
3. Version bump analysis

E2E tests must pass before PR can be merged.

Reviewed-on: #27
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
2026-04-27 01:59:16 +00:00
Gitea Actions 75358bf20d chore: bump version to v0.1.6 2026-04-26 04:27:54 +00:00
david b7fcb94ccb feat: add cucumber gherkin-style E2E test framework
- Install @cucumber/cucumber and cucumber-pretty dependencies
- Create Cucumber configuration with tsx loader for TypeScript support
- Add step definitions for common navigation, form interactions, and assertions
- Add authentication step definitions for login/logout flows
- Create feature files for user registration and authentication
- Support multiple auth contexts (player, tournament admin, club admin)
- Configure package.json scripts for running Cucumber tests

Key features:
- Gherkin syntax (Given/When/Then) for behavior-driven testing
- Browser-only interactions (no direct database access)
- Dev site testing (tests run against running dev server)
- Happy path focus for acceptance testing
- Integration with existing TypeScript project
2026-04-26 04:25:56 +00:00
Gitea Actions 8ea12f39d2 chore: bump version to v0.1.5 2026-04-26 04:01:29 +00:00
Gitea Actions 04dfdfa378 chore: bump version to v0.1.4 2026-04-02 04:51:31 +00:00
david 96a7454d2f fix: downgrade ESLint to v8.57.1 for LSP compatibility
- Downgrade ESLint from v10.1.0 to v8.57.1
- Create .eslintrc.json config (ESLint v8 format)
- Remove eslint.config.js (flat config format)
- ESLint LSP (vscode-langservers-extracted) doesn't support ESLint v10+

The vscode-eslint-language-server from vscode-langservers-extracted v4.10.0
is not compatible with ESLint v10's Flat Config format. Downgrading to
ESLint v8 ensures the ESLint LSP in Neovim works correctly.
2026-04-01 12:58:58 -07:00
david ed43399b24 fix: improve TypeScript types for better IDE code hinting
- Install @types/bun and @types/jsdom for proper type definitions
- Fix mock function typing in test files
- Create jest-dom.d.ts to properly extend Bun's Matchers interface
- Remove MockedFunction imports (not supported in Bun's types)
- Cast global.fetch and useSession mocks to any where needed
- Fix mock.module return types to match expected signatures

This resolves TypeScript errors that were preventing proper code
completion and type checking in IDEs.
2026-04-01 12:44:44 -07:00
david 2e98e9eb51 Revert "fix: downgrade ESLint to v8.x for .eslintrc.json compatibility"
This reverts commit 3a7a9b4b8e.
2026-04-01 12:35:52 -07:00
david 3a7a9b4b8e fix: downgrade ESLint to v8.x for .eslintrc.json compatibility
ESLint v10.x requires the new flat config format (eslint.config.js),
but the project uses the old .eslintrc.json format. Downgrading to
ESLint v8.x which supports the legacy configuration format.
2026-04-01 12:35:29 -07:00
david b90ec08966 refactor: improve test structure for Bun compatibility
Pull Request / unit-tests (pull_request) Failing after 58s
Pull Request / acceptance-tests (pull_request) Has been skipped
Pull Request / analyze-bump-type (pull_request) Has been skipped
- Update all test files to use named mock variables instead of inline mocks
- Clear mock history in beforeEach instead of using mock.restore()
- Add default mock implementations stored at module level
- Document that tests should not use --randomize flag due to mock.module() limitations
- All 89 unit tests pass consistently without randomization
2026-04-01 01:05:01 -07:00
david 24db43eb7f feat: migrate from npm to Bun
Test / unit-tests (push) Failing after 1m54s
Pull Request / unit-tests (pull_request) Failing after 1m41s
Pull Request / acceptance-tests (pull_request) Has been skipped
Pull Request / analyze-bump-type (pull_request) Has been skipped
- Install Bun via mise
- Update package.json scripts to use Bun
- Migrate unit tests from Vitest to Bun test runner
- Migrate component tests from Vitest to Bun test runner
- Configure Bun with DOM environment for React Testing Library
- Keep Playwright for E2E tests (as planned)
- 93/100 tests passing (7 flaky tests when running all together, pass individually)
2026-04-01 00:13:15 -07:00
Gitea Actions ec3297befe chore: bump version to v0.1.3 2026-04-01 06:31:42 +00:00
david 501e1b7e23 fix: version bumping and Docker registry authentication (#17)
Release / release (push) Failing after 1m9s
Test / unit-tests (push) Successful in 2m5s
## Summary

This PR fixes the release workflow to properly handle version bumping on PR merge and uses the new Docker registry authentication secrets.

## Changes

### Release Workflow (release.yml)
- **Version Bumping**: Now automatically bumps version on PR merge
  - Determines bump type from commit messages (major/minor/patch)
  - Commits version bump to `package.json` and `CHANGELOG.md`
  - Creates git tag for the release
- **Docker Registry Auth**: Uses `DOCKER_LOGIN` and `DOCKER_PASSWORD` secrets
  - Falls back gracefully if secrets are not configured
- **Tag Handling**: Checks if tag exists before creating (prevents failures)

### PR Workflow (pr.yml) - NEW
- Runs unit tests on every PR
- Analyzes commits to suggest bump type
- Comments the suggested bump type on the PR

### Documentation
- Added `WORKFLOW_ARCHITECTURE.md` explaining the workflow design

## Workflow Architecture

**Two-step process:**
1. **PR Workflow** (on PR): Analyzes commits and suggests bump type
2. **Release Workflow** (on merge): Bumps version, creates tag, builds Docker image

## Benefits

1. **No CI Loops**: Version bump commits are detected and skipped
2. **Clear Communication**: PR comments inform developers of version impact
3. **Semantic Versioning**: Automated adherence to semver rules
4. **Traceability**: Git tags and changelog reflect all changes

## Testing

The new workflows will be tested when this PR is merged.

Closes #13 (Add database test safety configuration)

Reviewed-on: #17
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
2026-04-01 05:03:14 +00:00
david 381bf630c7 chore: bump version to v0.1.1 2026-03-31 18:44:33 -07:00
david 4e112c92ae fix: remove hardcoded database URLs and use environment variables 2026-03-31 18:28:17 -07:00
david a9fc5c312a fix: set DATABASE_URL for acceptance tests 2026-03-31 18:24:53 -07:00
david abc1963aea feat: add database test safety configuration 2026-03-31 18:23:47 -07:00
david a82ec3c9fc chore: add production database cleanup scripts 2026-03-31 16:57:36 -07:00
david b5af4b2e34 docs: add development database and testing documentation 2026-03-31 16:53:42 -07:00
david 26c5158724 feat: set up development database and test cleanup utilities 2026-03-31 16:52:56 -07:00
david 33beed97c3 chore: prepare v0.1.0 release with correct image tags 2026-03-31 16:35:18 -07:00
david 779f9f4e7c chore: implement semantic versioning with docker image tagging 2026-03-31 16:34:30 -07:00
david 8e98ffa73d fix: update dev and build scripts to set NEXT_PUBLIC_GIT_COMMIT environment variable 2026-03-31 15:11:35 -07:00
david 0ae4a171fd feat: add git commit hash to footer for version tracking 2026-03-31 11:44:13 -07:00
david 81c8bdf821 chore: add openskill and glicko2 dependencies 2026-03-31 03:39:48 -07:00
david 3465082816 fix(prisma): use PostgreSQL adapter for Prisma v7 client connection 2026-03-31 00:10:47 -07:00
david 15b579b919 chore(deps): upgrade React 18→19, Next.js 14→16, Prisma 6→7 2026-03-31 00:00:07 -07:00
david bcb967017f feat: add Docker support with PostgreSQL and health check endpoint 2026-03-29 20:38:56 -07:00
david 803f936e2f feat: add PostgreSQL database adapter support 2026-03-29 20:08:53 -07:00
david 123df671f5 nextjs-rewrite (#5)
Reviewed-on: #5
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
2026-03-30 02:30:13 +00:00
david d0010a5c9b initial commit hanami 2024-09-06 12:59:40 -07:00