1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
version = "0.1.0"
author = "pulseboard"
description = "pulseboard: a small RSS reader"
license = "MIT"
srcDir = "."
requires "nim >= 2.2.0"
# Probes that touch only this machine. Safe to run anywhere, including CI.
const offlineProbes = @[
"pulseboarddb_probe",
"stores_probe",
]
# Probes that talk to real servers. Kept separate because a failure here can
# mean "bsky.social is having a bad day" rather than "the port is broken", and
# a test suite that cannot tell those apart stops being believed.
const networkProbes = @[
"feedparser_probe", # fixtures are offline, but it also fetches real feeds
"feedfetcher_probe", # retry policy is scripted; one check hits the network
"scraper_probe", # fixtures are offline; one check fetches a real article
]
proc runProbe(name: string) =
echo "\n=== " & name
exec "nim c -r --hints:off -d:ssl " & name & ".nim"
task test, "Run the probes that need no network":
for probe in offlineProbes:
runProbe(probe)
echo "\nAll offline probes passed."
task testnet, "Run the probes that talk to real servers":
for probe in networkProbes:
runProbe(probe)
echo "\nAll network probes passed."
task testall, "Run every probe":
for probe in offlineProbes & networkProbes:
runProbe(probe)
echo "\nAll probes passed."
task build, "Compile every module without running anything":
for probe in offlineProbes & networkProbes:
exec "nim c --hints:off -d:ssl -c " & probe & ".nim"
echo "\nEverything compiles."
task schema, "Regenerate reader/schema.nim from the Go source":
exec "python3 tools/extract_schema.py"
|