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:
@@ -127,6 +127,29 @@ npm run db:setup-postgres
|
||||
DATABASE_PROVIDER=sqlite DATABASE_URL=file:./prisma/ci.db npm run test:acceptance
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
**Alternative for performance:**
|
||||
If CI performance becomes an issue, consider:
|
||||
- Using GitHub Actions cache for node_modules
|
||||
- Using a self-hosted runner with persistent workspace
|
||||
- Using the main Dockerfile's `test-runner` target for release workflows (which works because it builds a complete image)
|
||||
|
||||
### CI/CD Pipeline
|
||||
The project uses Gitea Actions for continuous integration:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user