-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Add GitHub Actions workflow for CI #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a GitHub Actions CI workflow and applies formatting/refactor and small behavioral improvements across the Rust project: changes touch build script, feed/date handling, renderer formatting, and the Cargo manifest. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer (push/PR)
participant GH as GitHub Actions CI
participant Rust as Rust toolchain
participant Bun as Bun + JS toolchain
participant Tailwind as Tailwind (bun x)
participant Build as typstify-ssg build
Dev->>GH: push / open PR to main
GH->>GH: checkout repo
GH->>Rust: setup rust (stable + clippy + rustfmt)
GH->>GH: restore cargo cache
GH->>Rust: run cargo fmt -- --check
GH->>Rust: run cargo clippy (deny warnings)
GH->>Rust: run cargo test --all-features
GH->>Bun: setup Bun (latest)
GH->>GH: restore node/bun cache
GH->>Bun: bun install
GH->>Tailwind: bun x tailwindcss build (CSS)
GH->>Rust: cargo build --release
GH->>Build: typstify-ssg generate site
GH->>GH: upload artifact "site"
Note right of GH: Workflow ends
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code graph analysis (2)typstify-ssg/src/lib.rs (1)
typstify-ssg/src/feed.rs (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
46-49: Consider pinning Bun to a specific version instead of "latest" for greater build determinism.Using
bun-version: latestmeans each workflow run may use a different Bun version. While yourpackage.jsonspecifies"engines": { "bun": ">=1.0.0" }to enforce a minimum version, pinning to a specific tested version (e.g.,bun-version: 1.0.0) would ensure fully reproducible builds and reduce the risk of subtle incompatibilities from new Bun releases.If pinning to
latestis intentional, this can be documented in the workflow or README for team clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yml(1 hunks)
🔇 Additional comments (5)
.github/workflows/ci.yml (5)
26-35: Cache configuration for Cargo looks good.The Cargo registry, git, and target directories are properly cached with a cache key based on
Cargo.lock, and fallback restore-keys are in place. This should significantly speed up subsequent workflow runs.
37-44: Linting and testing steps are well-configured.
cargo fmt --all -- --checkcorrectly enforces code formattingcargo clippy --workspace --all-targets -- -D warningsdenies warnings, which is good for CIcargo test --workspace --all-features --no-fail-fastensures comprehensive testingThese are solid practices for maintaining code quality.
61-65: No issues found—thebuildscript is correctly configured in package.json.The verification confirms that the
buildscript exists and is properly set up to run Tailwind CSS compilation with minification. The workflow on line 65 will execute successfully.
51-59: Bun/node_modules caching is well-configured.The caching strategy for
node_modulesand Bun cache withbun.lockas the cache key is sound and mirrors Cargo caching best practices. Verification confirmsbun.lockis committed to the repository, ensuring the cache key works reliably.
73-79: Artifact upload configuration is verified and correct.Both paths are properly produced during the build process:
site/**is generated by the SSG step (defaultoutput_dirfrom config is "site")style/output.cssis produced by the Tailwind CSS build step (bun run build)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive CI workflow using GitHub Actions to automate code quality checks, testing, and build processes for the Typstify project.
Key Changes:
- Automated Rust code quality checks (formatting, linting, testing) on every push and PR to main
- Automated CSS build pipeline using Bun and Tailwind CSS
- Static site generation and artifact uploading for deployment readiness
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔧 Changes
Adds a comprehensive CI workflow using GitHub Actions.
📋 Workflow Steps
Code Quality Checks
cargo fmt --check- Verify code formattingcargo clippy- Lint with deny warningscargo test- Run all testsBuild Process
bun run build)Artifacts
site/**andstyle/output.css⚡ Optimizations
🎯 Triggers
mainbranchmain✅ Tested
The workflow configuration follows GitHub Actions best practices and should run successfully on the first execution.
Summary by CodeRabbit
Chores
New Features
Refactor