Repository navigation
69 lines (62 loc) · 2.16 KB
/
Copy pathchanges-fragments.yml
File metadata and controls
69 lines (62 loc) · 2.16 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
# Part of the EDG Compiler Project, under the Apache License v2.0 with LLVM
# Exceptions.
# See https://edgcpp.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# Check the pending Changes entries (*/pending_changes/*.txt) with
# `edg-collect-changes --check` (format, spelling, typos, line length), so a
# bad entry is caught before the nightly collect-changes job meets it, and run
# the unit tests of the tools involved.
name: Pending Changes Entries
on:
push:
branches:
- main
paths:
- '**/pending_changes/**'
- .github/workflows/changes-fragments.yml
- dev_tools/bin/edg-check-file-changes
- dev_tools/bin/edg-collect-changes
- dev_tools/pylibs/edgchanges/**
- dev_tools/pylibs/edgutil/**
- dev_tools/tests/**
pull_request:
paths:
- '**/pending_changes/**'
- .github/workflows/changes-fragments.yml
- dev_tools/bin/edg-check-file-changes
- dev_tools/bin/edg-collect-changes
- dev_tools/pylibs/edgchanges/**
- dev_tools/pylibs/edgutil/**
- dev_tools/tests/**
permissions:
contents: read
jobs:
check:
name: check-pending-changes
runs-on: ubuntu-latest
timeout-minutes: 10
env:
PYTHONPATH: ${{ github.workspace }}/dev_tools/pylibs
# Each holds a Changes file and its pending_changes/ directory (keep in
# step with the list in collect-changes.yml).
CHANGES_DIRS: src util lib_src include_c++ nt_util
steps:
- name: Check out repository
uses: actions/checkout@v7
# The same dictionary as the dev-env image
# (dev_tools/docker/dev-env/setup-scripts/install-software.sh).
- name: Install aspell
run: |
sudo apt-get update
sudo apt-get install -y aspell aspell-en
- name: Run unit tests
run: python3 -m unittest discover -s dev_tools/tests -v
- name: Check pending Changes entries
run: |
status=0
for dir in ${CHANGES_DIRS}; do
dev_tools/bin/edg-collect-changes --check \
"${dir}/Changes" "${dir}/pending_changes" || status=1
done
exit "${status}"