forked from ChelseaKR/tods-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (80 loc) · 3 KB
/
Copy pathci.yml
File metadata and controls
87 lines (80 loc) · 3 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"
- run: python -m pip install ".[dev]"
- run: ruff check src tests scripts
- run: ruff format --check src tests scripts
- run: mypy
docs-drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"
- run: python -m pip install .
- name: Check that docs/rules.md matches the rule registry
run: |
python scripts/generate_rules_doc.py --check
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install ".[dev]"
- run: pytest --cov --cov-report=term-missing --cov-fail-under=80
action-self-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Run the action against the valid fixture feed
uses: ./
with:
path: tests/fixtures/valid/tods
gtfs: tests/fixtures/valid/gtfs
merge-handoff:
# Materialize the TODS-Supplemented GTFS and hand it to gtfs-validator, so
# the merge contract is exercised end to end. Informational: a downstream
# change should surface here without blocking unrelated work.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: "17"
- run: python -m pip install .
- name: Merge the valid fixture feed
run: |
tods-validate merge tests/fixtures/valid/tods \
--gtfs tests/fixtures/valid/gtfs -o supplemented.zip
- name: Validate the merged feed with gtfs-validator
run: |
curl -sSL -o gtfs-validator.jar \
https://github.com/MobilityData/gtfs-validator/releases/latest/download/gtfs-validator-cli.jar
java -jar gtfs-validator.jar -i supplemented.zip -o validator-report
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: gtfs-validator-report
path: validator-report