Skip to content

Use assertMatch instead of assert #435

Use assertMatch instead of assert

Use assertMatch instead of assert #435

Workflow file for this run

name: Check UUID validity
on: [push, pull_request]
jobs:
uuid:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- run: sudo apt install --yes jq
- run: |
bad_uuid=$(cat config.json | jq --raw-output '.exercises | map(.uuid) | .[]' | grep -vE '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' || true)
if [[ -n "$bad_uuid" ]]; then
printf "Invalid UUID(s) found:"
printf "%s" "${bad_uuid}"
exit 1
fi