image: python:latest

before_script:
  - apt update && apt install -y jq
  - git clone --depth=1 https://gitlab.com/kicad/libraries/kicad-library-utils

stages:
  - stage_test_inventory
  - stage_test_footprints
  - stage_test_3dmodels

test_inventory:
  stage: stage_test_inventory
  needs: []
  script:
    - echo "Do we have all parts in inventory covered?"
    - ./tests/inventory.sh ./fab.kicad_sym ./tests/whitelist.txt
    - ./tests/symbols.sh

test_footprints:
  stage: stage_test_footprints
  needs: []
  allow_failure: true
  script:
    - echo "Do we have footprints for all symbols?"

test_3dmodels:
  stage: stage_test_3dmodels
  needs: []
  allow_failure: true
  script:
    - echo "Do we have 3D models for all footprints?"