-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.82 KB
/
Copy pathcheck-gtfs-feed.yml
File metadata and controls
66 lines (56 loc) · 1.82 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Check GTFS feed
on:
schedule:
- cron: "17 6 1 * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: gtfs-feed-check
cancel-in-progress: true
jobs:
compare:
name: Compare municipality feed
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python 3.13
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Verify comparison behavior
working-directory: gtfs-data
run: python -m unittest -v test_check_feed_update.py
- name: Download current municipality feed
run: |
mkdir -p feed-check
curl \
--fail \
--location \
--retry 3 \
--retry-all-errors \
--connect-timeout 15 \
--max-time 90 \
--output feed-check/candidate.zip \
https://pt.tirana.al/gtfs/gtfs.zip
- name: Compare snapshots
run: |
python gtfs-data/check_feed_update.py \
--baseline gtfs-data/gtfs.zip \
--candidate feed-check/candidate.zip \
--source-url https://pt.tirana.al/gtfs/gtfs.zip \
--json feed-check/report.json \
--markdown feed-check/report.md
cat feed-check/report.md >> "$GITHUB_STEP_SUMMARY"
- name: Preserve freshness report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: gtfs-freshness-${{ github.run_id }}
path: |
feed-check/report.json
feed-check/report.md
retention-days: 14