• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / fuel-prices-api / 22077498935
20%

Build:
DEFAULT BRANCH: main
Ran 16 Feb 2026 09:06PM UTC
Jobs 1
Files 8
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Feb 2026 09:06PM UTC coverage: 27.332% (+27.3%) from 0.0%
22077498935

push

github

web-flow
feat: Deduplicate repeated fuel prices (#7)

* refactor: Deduplicate repeated fuel prices

Updates the price search query to ensure that redundant
price reports (where the price value is unchanged from
a previous entry) are filtered out before calculating
the overall recency rank.

The new nested structure first filters based on the
`same_price_rank` to keep only the most recent
`price_last_updated` timestamp for any unique
combination of `node_id`, `fuel_type`, and `price`.

* Update internal/sql/search_prices.sql

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor: Remove redundant aliases in search_prices SQL

Removes the explicit table alias prefix `fp.` from column
selections within the nested subqueries in the
`search_prices.sql` script.

This simplifies the query structure without altering its
functionality, as the aliases were redundant in this context.

* test: add integration tests for repository

Add `repository_test.go` to verify the `FuelPricesRepository` logic
against an in-memory `SQLite` instance.

-   Validate **bounding box** spatial filtering.
-   Ensure **price deduplication** works by skipping consecutive
    identical prices in history.
-   Test **per-type limits** for historical price retrieval.
-   Register `github.com/mattn/go-sqlite3` driver in `internal/db.go`.
-   Add `github.com/stretchr/testify` to `go.mod`.

```mermaid
sequenceDiagram
    participant T as TestSuite
    participant R as Repository
    participant DB as SQLite
    T->>R: setupTestDB()
    R->>DB: Open & Migrate (:memory:)
    T->>R: InsertPFS()
    T->>R: InsertPrices()
    T->>R: Search(bbox, perTypeLimit)
    R->>DB: Query latest/historical prices
    DB-->>R: rows
    R-->>T: structured models.ForecourtResults
```

* chore: update go-redis and add atomic dependency

Update `github.com/redis/go-redis/v9` to **v9.18.0** and add
`go.uber.org/atomic` v1.11.0 to the project dependencies.

* refact... (continued)

167 of 611 relevant lines covered (27.33%)

0.3 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22077498935.1 16 Feb 2026 09:06PM UTC 8
27.33
GitHub Action Run
Source Files on build 22077498935
  • Tree
  • List 8
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0de76e7e on github
  • Prev Build on main (#22067620843)
  • Next Build on main (#22161656394)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc