diff --git a/.circleci/config.yml b/.circleci/config.yml index 67d786485..33dd55868 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,27 +1,38 @@ - version: 2 jobs: build: docker: - - image: circleci/node:4 + - image: circleci/python:3.6.4 - working_directory: ~/repo + working_directory: ~/stac steps: - checkout - + - run: sudo chown -R circleci:circleci /usr/local/bin + - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages + - restore_cache: + key: v2-python-requirements-{{ checksum "requirements.txt" }} - run: name: install command: | - cd validation - npm install - + git clone git@github.com:sparkgeo/stac-validator.git ~/stac-validator + cd ~/stac-validator + pip install -r requirements.txt + pip install . + - save_cache: + key: v2-python-requirements-{{ checksum "requirements.txt" }} + paths: + - "~/.cache/pip" + - "/usr/local/lib/python3.6/site-packages" - run: name: validate command: | - cd validation - npm run validate_catalog -- -d ../catalog-spec/examples/catalog.json - npm run validate_collection -- -d ../collection-spec/examples/sentinel2.json - npm run validate_extension -- -s ../extensions/scientific/schema.json -d ../extensions/scientific/example-merraclim.json - npm run validate_item -- -d ../item-spec/examples/sample.json - # ToDo: More files should be validated + python ~/stac-validator/stac_validator.py catalog-spec/examples/catalog.json + python ~/stac-validator/stac_validator.py collection-spec/examples/sentinel2.json + python ~/stac-validator/stac_validator.py item-spec/examples/sample.json + python ~/stac-validator/stac_validator.py item-spec/examples/sample-full.json + python ~/stac-validator/stac_validator.py item-spec/examples/sentinel2-sample.json + python ~/stac-validator/stac_validator.py item-spec/examples/planet-sample.json + python ~/stac-validator/stac_validator.py item-spec/examples/landsat8-sample.json + python ~/stac-validator/stac_validator.py item-spec/examples/digitalglobe-sample.json + python ~/stac-validator/stac_validator.py item-spec/examples/CBERS_4_MUX_20170528_090_084_L2.json