forked from ChelseaKR/tods-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
63 lines (59 loc) · 1.8 KB
/
Copy pathaction.yml
File metadata and controls
63 lines (59 loc) · 1.8 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
name: tods-validate
description: >-
Validate a Transit Operational Data Standard (TODS) feed and annotate
findings on the pull request.
branding:
icon: check-circle
color: green
inputs:
path:
description: Directory or .zip file containing the TODS files.
required: true
gtfs:
description: >-
Companion GTFS feed (directory or .zip). Leave empty if the GTFS files
sit next to the TODS files.
required: false
default: ""
fail-on:
description: Fail the job on findings at or above this severity (error or warning).
required: false
default: error
enable:
description: >-
Space-separated opt-in rules or categories to turn on (coverage, advisory,
experimental, or specific rule IDs).
required: false
default: ""
outputs:
error-count:
description: Number of errors found.
value: ${{ steps.validate.outputs.error-count }}
warning-count:
description: Number of warnings found.
value: ${{ steps.validate.outputs.warning-count }}
info-count:
description: Number of informational findings.
value: ${{ steps.validate.outputs.info-count }}
runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.13"
- name: Install tods-validate
shell: bash
run: python3 -m pip install --quiet "${{ github.action_path }}"
- name: Validate feed
id: validate
shell: bash
run: |
args=("${{ inputs.path }}" --format github --fail-on "${{ inputs['fail-on'] }}")
if [ -n "${{ inputs.gtfs }}" ]; then
args+=(--gtfs "${{ inputs.gtfs }}")
fi
for token in ${{ inputs.enable }}; do
args+=(--enable "$token")
done
tods-validate "${args[@]}"