added prov-o documentation to eson endpoint #74
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: TestExamples | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
env: | |
WORKING_DIR: ./examples/ | |
MAPPING_URL: 'https://github.com/Mat-O-Lab/MapToMethod/raw/main/examples/example-map.yaml' | |
PARSER_PORT: 3001 | |
APP_PORT: 5003 | |
MAPPER_PORT: 4000 | |
CONVERTER_PORT: 6000 | |
jobs: | |
TestExamples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: run app | |
run: | | |
docker-compose up -d | |
sleep 20 | |
docker ps -a | |
- name: parse mapping to YARRRML parser | |
working-directory: ${{env.WORKING_DIR}} | |
run: | | |
curl -X POST "http://localhost:${{env.APP_PORT}}/api/yarrrmltorml" -H "accept: application/json" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"mapping_url\":\"${{env.MAPPING_URL}}\"}" > example.rml | |
- name: join the method and the data meta graph | |
working-directory: ${{env.WORKING_DIR}} | |
run: | | |
RESULT="$(curl -X POST "http://localhost:${{env.APP_PORT}}/api/createrdf" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"mapping_url\":\"${{env.MAPPING_URL}}\"}")" | |
DATA="$(jq .graph <<< "$RESULT")" | |
#remove quots | |
echo -e "${DATA:1:-1}" > example.rdf | |
#unescape quots | |
sed -i 's/\\"/'\"'/g' example.rdf | |
- name: Commit files # commit the output folder | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'updated example output' | |
add: '*.* --force' | |
cwd: './examples/' |