-
Notifications
You must be signed in to change notification settings - Fork 6
Added basic code coverage in CI #81
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| coverage: | ||
| status: | ||
| project: | ||
| default: | ||
| target: 20% |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,38 +2,64 @@ name: Rust | |||||||||
|
|
||||||||||
| on: | ||||||||||
| push: | ||||||||||
| branches: [ "main" ] | ||||||||||
| branches: ["main"] | ||||||||||
| pull_request: | ||||||||||
| branches: [ "main" ] | ||||||||||
| branches: ["main"] | ||||||||||
|
|
||||||||||
| env: | ||||||||||
| CARGO_TERM_COLOR: always | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| build: | ||||||||||
|
|
||||||||||
| check: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
|
|
||||||||||
| - uses: dtolnay/rust-toolchain@master | ||||||||||
| with: | ||||||||||
| toolchain: 1.90.0 | ||||||||||
| components: rustfmt, clippy | ||||||||||
|
|
||||||||||
| - uses: actions/cache@v4 | ||||||||||
| with: | ||||||||||
| path: | | ||||||||||
| ~/.cargo/bin | ||||||||||
| ~/.cargo/registry | ||||||||||
| ~/.cargo/git | ||||||||||
| target | ||||||||||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||||||||||
|
|
||||||||||
| - name: Install just | ||||||||||
| run: command -v just || cargo install just | ||||||||||
|
|
||||||||||
| - name: Run checks | ||||||||||
| run: just check | ||||||||||
| coverage: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| needs: check # optional but recommended | ||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
|
||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - uses: dtolnay/rust-toolchain@master | ||||||||||
| with: | ||||||||||
| toolchain: 1.90.0 | ||||||||||
| components: rustfmt, clippy | ||||||||||
| - name: Cache cargo | ||||||||||
| uses: actions/cache@v4 | ||||||||||
| with: | ||||||||||
| path: | | ||||||||||
| ~/.cargo/bin | ||||||||||
| ~/.cargo/registry | ||||||||||
| ~/.cargo/git | ||||||||||
| target | ||||||||||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||||||||||
| restore-keys: | | ||||||||||
| ${{ runner.os }}-cargo- | ||||||||||
|
|
||||||||||
| - name: Install just | ||||||||||
| run: command -v just || cargo install just | ||||||||||
|
|
||||||||||
| - name: Run check | ||||||||||
| run: just check | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
|
|
||||||||||
| - uses: dtolnay/rust-toolchain@master | ||||||||||
| with: | ||||||||||
| toolchain: 1.90.0 | ||||||||||
|
|
||||||||||
| - uses: actions/cache@v4 | ||||||||||
| with: | ||||||||||
| path: | | ||||||||||
| ~/.cargo/bin | ||||||||||
| ~/.cargo/registry | ||||||||||
| ~/.cargo/git | ||||||||||
| target | ||||||||||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||||||||||
|
|
||||||||||
| - name: Install tarpaulin | ||||||||||
| run: cargo install cargo-tarpaulin | ||||||||||
|
Comment on lines
+56
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
Sources: [1] (docs.rs), [2] (cargo-book.irust.net), [3] (dev-doc.rust-lang.org), [4] (docs.rs) Citations:
Use Unpinned installs can change behavior across CI runs. The 🔧 Suggested change - name: Install tarpaulin
- run: cargo install cargo-tarpaulin
+ run: cargo install cargo-tarpaulin --locked📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| - name: Run coverage | ||||||||||
| run: cargo tarpaulin --out Xml -- --test-threads 1 | ||||||||||
|
|
||||||||||
| - name: Upload to Codecov | ||||||||||
| uses: codecov/codecov-action@v4 | ||||||||||
| with: | ||||||||||
| token: ${{ secrets.CODECOV_TOKEN }} | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,6 @@ | |
| .tiles_dev | ||
| dist/ | ||
| stack_export_prod/ | ||
| *.profraw | ||
| tilekit/target | ||
| tiles/target | ||
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.
🧩 Analysis chain
🏁 Script executed:
# Read the rust.yml workflow file cat -n .github/workflows/rust.ymlRepository: tilesprivacy/tiles
Length of output: 1960
🌐 Web query:
Rust 1.90.0 release date and availability💡 Result:
Rust 1.90.0 was released on September 18, 2025. [1][2]
Availability: it’s available on the stable channel via rustup:
and via Rust’s official distribution/installers for that release. [1]
🌐 Web query:
Rust toolchain versions 2025 2026 latest stable💡 Result:
Latest Rust stable (as of Jan 31, 2026)
Rust stable releases in 2025 → early 2026 (version → release date)
Update command:
rustup update stable[2]Sources
[1] https://doc.rust-lang.org/stable/releases.html
[2] https://endoflife.date/rust
[3] https://releases.rs/
[4] https://blog.rust-lang.org/2025/01/09/Rust-1.84.0/
[5] https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/
[6] https://blog.rust-lang.org/2025/05/15/Rust-1.87.0/
[7] https://blog.rust-lang.org/2025/10/30/Rust-1.91.0/
[8] https://releases.rs/docs/1.92.0/
🌐 Web query:
dtolnay/rust-toolchain github action recent commits pinned version💡 Result:
Most recent commits on
master#177“Permit cross-device copy” (latestmastercommitf7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561) [3]Pinned version (recommended stable pin for the Action code)
dtolnay/rust-toolchain@v1— currently points to commite97e2d8(dated 2025-08-23) [4].masterhistory) as noted in the README [1].Toolchain selection (separate from pinning the Action code)
@revyou use (e.g.,@stable,@nightly,@1.89.0) determines which Rust toolchain is installed [1].Pin the rust-toolchain action to improve supply-chain security.
@masteris mutable and weakens supply-chain guarantees. Pin the action to a stable reference such as@v1or a specific commit (e.g.,f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561).Additionally, Rust 1.90.0 is now outdated (released Sep 2025; current stable is 1.93.0 as of Jan 2026). Consider updating to a more recent toolchain version when pinning.
🔒 Suggested fix (apply to both jobs)
Also applies to: 43-46
🤖 Prompt for AI Agents