ci-image-improvements (#18)
Reviewed-on: #18 Co-authored-by: David Gwilliam <dhgwilliam@gmail.com> Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #18.
This commit is contained in:
@@ -368,10 +368,27 @@ The application uses Gitea Actions for continuous integration and deployment:
|
||||
- Unit tests for quick feedback
|
||||
- Skips auto-generated version bumps
|
||||
|
||||
3. **Release Workflow** (`.gitea/workflows/release.yml`): Runs on main branch pushes
|
||||
- Version bumping and tagging
|
||||
- Docker image building and testing
|
||||
- Registry push and deployment
|
||||
3. **Release Workflow** (`.gitea/workflows/release.yml`): Runs on main branch pushes
|
||||
- Version bumping and tagging
|
||||
- Docker image building and testing
|
||||
- Registry push and deployment
|
||||
|
||||
### CI Runner Image
|
||||
|
||||
**Note:** The CI runner image approach has been deprecated for Gitea Actions workflows.
|
||||
|
||||
The original attempt to use a pre-built CI runner image with pre-installed dependencies encountered fundamental issues with how Gitea Actions handles workspace mounting. When Gitea Actions runs a container job, it mounts the workspace at a specific path (e.g., `/workspace/david/euchre_camp`), which hides the container's `/app` directory where dependencies were installed.
|
||||
|
||||
**Current Approach:**
|
||||
- Workflows use standard `node:20-alpine` or `mcr.microsoft.com/playwright` containers
|
||||
- Dependencies are installed via `npm ci` in each workflow run
|
||||
- This is the recommended approach for Gitea Actions
|
||||
|
||||
**Why the CI image approach doesn't work:**
|
||||
1. Dockerfile.ci installs dependencies in `/app`
|
||||
2. Gitea Actions mounts workspace at `/workspace/david/euchre_camp`
|
||||
3. Workspace mount hides the `/app` directory
|
||||
4. Symlinks from `/app/node_modules` don't work because `/app` is hidden
|
||||
|
||||
### Database Strategy for CI
|
||||
- **CI Tests**: SQLite database (fast, no server required)
|
||||
|
||||
Reference in New Issue
Block a user