Update ca-eccc-msc-surface-weather-observations.yml #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |