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

rm-hull / next-departures-api / 25073731598
28%

Build:
DEFAULT BRANCH: main
Ran 28 Apr 2026 07:39PM UTC
Jobs 1
Files 13
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

28 Apr 2026 07:38PM UTC coverage: 7.488% (-0.2%) from 7.673%
25073731598

push

github

web-flow
feat: add cron job for periodic NaPTAN updates (#3)

Introduces a background worker to automatically refresh the NaPTAN
dataset at regular intervals.

- Added `github.com/robfig/cron/v3` dependency.
- Implemented a cron job that triggers every 19 hours.
- Centralized the NaPTAN dataset URL in `internal/models`.
- Updated `ApiServer` to initialize the scheduler on startup.
- Refined import logging frequency and messaging.

```mermaid
sequenceDiagram
    participant S as API Server
    participant C as Cron Scheduler
    participant E as External NaPTAN API
    participant R as Repository (SQLite)

    S->>C: StartCron(repo)
    loop Every 19 hours
        C->>E: Download CSV
        E-->>C: CSV Stream
        C->>R: ImportCSV()
        Note right of R: Transactional Update
        R-->>C: Done
    end
```

---------

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

0 of 25 new or added lines in 4 files covered. (0.0%)

1 existing line in 1 file now uncovered.

62 of 828 relevant lines covered (7.49%)

0.08 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
0.0
internal/cron.go
6
0.0
0.0% cmd/api_server.go
3
15.26
0.0% internal/repository.go
1
0.0
0.0% cmd/import.go

Coverage Regressions

Lines Coverage ∆ File
1
15.26
0.0% internal/repository.go
Jobs
ID Job ID Ran Files Coverage
1 25073731598.1 28 Apr 2026 07:39PM UTC 13
7.49
GitHub Action Run
Source Files on build 25073731598
  • Tree
  • List 13
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 88d53e6c on github
  • Prev Build on main (#25072634506)
  • Next Build on main (#25074426878)
  • 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