Skip to content

Commit

Permalink
CI: add a workflow to check for "sysinfo" in newly added data files
Browse files Browse the repository at this point in the history
This is a simple grep only, we don't need anything fancier since the
main goal here is to have the CI alert us that the sysinfo is missing.

Fixes #348

Signed-off-by: Peter Hutterer <[email protected]>
  • Loading branch information
whot committed Dec 20, 2021
1 parent df93bfc commit fd6483f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check-for-sysinfo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Check for sysinfo in data files"

on: [ pull_request ]

jobs:
checksysinfo:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: tj-actions/[email protected]
id: added-files
with:
path: data
- name: Check for sysinfo in all added files
run: |
for file in ${{ steps.added-files.outputs.added_files }}; do
if [[ "$file" == *.tablet ]]; then
grep -q "sysinfo" $file || (echo "Missing reference to sysinfo.DEADBEEF.gz in $file" && exit 1)
fi
done

0 comments on commit fd6483f

Please sign in to comment.