Skip to content

Update ca-eccc-msc-surface-weather-observations.yml #12

Update ca-eccc-msc-surface-weather-observations.yml

Update ca-eccc-msc-surface-weather-observations.yml #12

name: Generate and validate WCMP2 discovery metadata
env:
WIS2_CENTRE_ID: ca-eccc-msc
on:
pull_request:
paths:
- 'metadata/mcf/**.yml'
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Setup Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
python3 -m pip install --upgrade pip
pip3 install https://github.com/geopython/pygeometa/archive/master.zip
pip3 install https://github.com/wmo-im/pywcmp/archive/master.zip
- name: Cache WCMP2 schemas for validation
run: |
pywcmp bundle sync
- name: make temporary directory
run: |
mkdir /tmp/wcmp2-records
- name: Generate WCMP2 records from MCFs
run: |
for i in metadata/mcf/*.yml; do pygeometa metadata generate --schema wmo-wcmp2 $i --output /tmp/wcmp2-records/`basename ${i%.yml}.json`; done
- name: Validate WCMP2 records
run: |
for i in /tmp/wcmp2-records/*.json; do pywcmp ets validate $i; done