Skip to content

Update with non colliding zones, passing verification program. #66

Update with non colliding zones, passing verification program.

Update with non colliding zones, passing verification program. #66

Workflow file for this run

# Validate france.txt on feature change
name: feature/* Validate france.txt
# Controls when the workflow will run
on:
push:
branches: [ "feature/*" ]
paths:
- 'france.txt'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
manual_Run:
description: 'Manually triggered'
required: true
default: 'warning'
pull_request:
branches:
- main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# see: https://github.com/marketplace/actions/ftp-deployment
jobs:
validate-airspace:
if: github.ref != 'main'
name: Validate OpenAir france.txt
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- id: validation
name: Validate france.txt + generate .geojson
run: |
echo "## Install openaip-openair-parser"
git clone https://github.com/openAIP/openaip-openair-parser.git
cd openaip-openair-parser
npm install
echo "## Validating ..."
rm ../france.geojson
echo "Run validation script"
SCRIPT_OUTPUT=$(node ./cli.js -f ../france.txt --validate --debug -E -o ../france.geojson)
SCRIPT_RC=$?
echo "parser_output=$SCRIPT_OUTPUT"
echo "parser_output=$SCRIPT_OUTPUT" >> $GITHUB_OUTPUT
outputs:
validation-output: ${{ steps.validation.outputs.parser_output }}
check-validation:
name: Check Validation
runs-on: ubuntu-latest
needs: [validate-airspace]
steps:
- name: Display validation output
run: |
echo "Validation output="
echo ${{needs.validate-airspace.outputs.validation-output}}
- name: Check validation
if: |
always() &&
contains(needs.validate-airspace.outputs.validation-output, 'Error')
uses: actions/github-script@v3
with:
script: |
core.setFailed('Validation failed ! See Above step for details...')