This directory contains automated CI/CD workflows for PersonalLog.
Triggers:
- Push to
mainbranch - Pull requests to
mainbranch
Jobs:
- Lint: Runs ESLint
- Type Check: Validates TypeScript types
- Build: Creates production Next.js build
Status Badge:
Triggers:
- Push to
mainordevelopbranches - Pull requests to
mainordevelopbranches - Changes to
native/rust/**files - Manual dispatch
Jobs:
-
Build WASM: Compiles Rust to WebAssembly
- Sets up Rust toolchain
- Installs wasm-pack
- Builds development and release versions
- Checks file size
- Uploads artifacts
-
Test WASM: Runs WASM unit tests
- Runs
wasm-pack test --node - Runs Rust cargo tests
- Runs Clippy linter
- Checks code formatting
- Runs
-
Integration Test: Tests with Next.js
- Downloads WASM artifacts
- Installs Node dependencies
- Verifies WASM loading
- Type checks
- Builds Next.js app
-
Benchmark: Performance testing (main branch only)
- Runs vector operation benchmarks
- Reports ops/sec metrics
Status Badge:
Triggers:
- Creating release tags
Jobs:
- Builds and creates GitHub releases
- Publishes packages (when configured)
- ~/.cargo/registry
- ~/.cargo/git
- native/rust/target- ~/.pnpm-store
- node_modulesCache keys use hash of lock files for automatic invalidation.
- Name:
wasm-package - Contents:
native/rust/pkg/ - Retention: 7 days
- Used by: Integration tests
- Name:
dist - Contents:
.next/ - Retention: 7 days
- Used by: Deployment
Test workflows locally using act:
# Install act
brew install act # macOS
choco install act # Windows
# Run CI workflow
act push
# Run WASM workflow
act -j build-wasmView workflow runs at:
Currently, no secrets are required for public workflows.
When implementing package publishing, add:
NPM_TOKEN- For npm registryGITHUB_TOKEN- Automatically provided by GitHub Actions
When adding new workflows:
- Use consistent naming:
kebab-case - Add status badges to README.md
- Document triggers and jobs
- Test locally with
act - Update this README
- Check environment variables
- Verify tool versions match CI
- Ensure all secrets are available
- Increase
timeout-minutesin workflow - Check for infinite loops in Rust code
- Reduce optimization level temporarily
- Clear cache: Delete cache key in Actions settings
- Force rebuild: Push empty commit with
[ci cache-clear]