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

rm-hull / fuel-prices-api / 22163985049 / 1
50%
main: 50%

Build:
DEFAULT BRANCH: main
Ran 19 Feb 2026 12:53AM UTC
Files 8
Run time 0s
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

19 Feb 2026 12:52AM UTC coverage: 28.595% (+1.3%) from 27.332%
22163985049.1

push

github

web-flow
feat: add database migrations and price timestamps (#9)

* feat: add database migrations and price timestamps

- Integrate `golang-migrate` to manage **SQLite** schema versions.
- Add `price_change_effective_timestamp` to track when fuel prices
  officially change.
- Simplify API response decoding by removing legacy metadata wrappers
  and batch tracking.
- Update `Dockerfile` and repository tests to support the new
  migration-based workflow.

```mermaid
sequenceDiagram
    participant App as API Server
    participant Mig as golang-migrate
    participant DB as SQLite
    participant API as Gov API

    App->>Mig: Migrate("migrations", dbPath)
    Mig->>DB: Run .up.sql scripts
    App->>API: GetFuelPrices()
    API-->>App: Return prices with effective timestamps
    App->>DB: Upsert prices with PriceChangeEffectiveTimestamp
```

* chore: promote migrate to direct dependency

Promote `github.com/golang-migrate/migrate/v4` from an indirect to a
direct dependency in `go.mod`. This change ensures the library is
explicitly tracked as a requirement for the project.

* fix: close database and migration resources

Ensure migration source and database connections are properly released
to prevent resource leaks and potential file locks:

-   Add `defer m.Close()` in `Migrate` to clean up migration drivers.
-   Update `setupTestDB` to close the database handle before removing
    the temporary file.

173 of 605 relevant lines covered (28.6%)

0.31 hits per line

Source Files on job 22163985049.1
  • Tree
  • List 8
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22163985049
  • aee0539a on github
  • Prev Job for on main (#22161656394.1)
  • Next Job for on main (#22164671138.1)
  • 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