diff --git a/.github/workflows/check_generated.yml b/.github/workflows/check_generated.yml index 03a7a9c4..371e162d 100644 --- a/.github/workflows/check_generated.yml +++ b/.github/workflows/check_generated.yml @@ -1,5 +1,4 @@ - -name: Check generated files +name: Check mapfiles on: pull_request: @@ -8,14 +7,15 @@ on: - master jobs: - check_generated: + check_maps: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: 3.11 + cache: "pip" # Some mapfiles are generated by scripts, but also committed to the repo. # Check for mismatches between committed files and script output. - name: Regenerate mapfiles and check for equality @@ -31,8 +31,8 @@ jobs: fi python3 "$script" | cmp - "$mapfile" done - # This one is not committed, but generated by the Docker entrypoint. - # It should at least be valid JSON. + # The index.json file is not committed, but generated by the Docker + # entrypoint. It should at least be valid JSON. - name: Check index.json file run: | # Create some bogus connection files, or including them will fail: @@ -40,4 +40,14 @@ jobs: for c in bag basiskaart dataselectie dataservices milieu monumenten nap panorama various_small_datasets; do echo CONNECTIONTYPE postgis > connection/$c.inc done - python3 tools/make_indexjson.py *.map | jq . + python3 tools/make_indexjson.py *.map | jq . > /dev/null + - name: Authorization checks + run: | + python3 -m pip install -r tools/requirements.txt + # adresseerbare_objecten and bgt_inrichtingselementen can't be parsed + # due to limitations in mappyfile. + # The other excluded maps should be fixed. They have workarounds in + # place to prevent access to restricted fields. + python3 tools/auth_check.py -e \ + adresseerbare_objecten bgt_inrichtingselementen \ + bomen brk2 ziektenplagenexotengroen