Debian Codegraph @

.github/workflows/check-dictionary-sorted.yml

raw symbols SCIP
1 name: Check Dictionary Sorting
2
3 on:
4 pull_request:
5 push:
6
7 concurrency:
8 group: ${{ github.workflow }}-${{ github.ref }}
9 cancel-in-progress: true
10
11 jobs:
12 sort-check:
13 permissions:
14 contents: read
15 runs-on: ubuntu-latest
16 steps:
17 - name: Checkout
18 uses: actions/checkout@v5
19 - name: Set up Python
20 uses: actions/setup-python@v6
21 with:
22 python-version: "3.x"
23 - name: Sort dictionaries
24 run: |
25 for file in data/dictionary/*.txt; do
26 python3 data/scripts/sort.py "$file"
27 done
28 - name: Verify no diff
29 run: |
30 if ! git diff --exit-code; then
31 echo "Dictionary files are not sorted. Run: python3 data/scripts/sort.py data/dictionary/*.txt"
32 exit 1
33 fi