-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (54 loc) · 1.99 KB
/
TestPipeline.yml
File metadata and controls
59 lines (54 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: TestPipeline
on:
workflow_dispatch:
env:
#WORKING_DIR: ./tools/examples/
RAW_URL: 'https://github.com/Mat-O-Lab/CSVToCSVW/raw/main/examples/example.csv'
MAPREQUEST_URL: 'https://github.com/Mat-O-Lab/MapToMethod/raw/main/examples/request.json'
METHOD_URL: 'https://github.com/Mat-O-Lab/MSEO/raw/main/methods/DIN_EN_ISO_527-3.drawio.ttl'
defaults:
run:
working-directory: ./tools/examples/
jobs:
TestPipeline:
runs-on: ubuntu-latest
services:
csvtocsvw:
image: ghcr.io/mat-o-lab/csvtocsvw:latest
ports:
- 5001:5000
maptomethod:
image: ghcr.io/mat-o-lab/maptomethod:latest
ports:
- 5002:5000
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: create csvw json-ld meta data
run: |
curl -LJO ${{env.RAW_URL}}
RESULT=$(curl -X POST "http://localhost:5001/api" -H "accept: application/json" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"data_url\":\"${{env.RAW_URL}}\"}")
FILEDATA=$(echo $RESULT | jq -r '.filedata')
FILENAME=$(echo $RESULT | jq -r '.filename')
echo $FILENAME
echo $FILEDATA > $FILENAME
- name: create a YARRRML mapping file
run: |
curl -LJO ${{env.MAPREQUEST_URL}}
cat request.json
RESULT=$(curl -X 'POST' \
'http://localhost:5002/api/mappingfile' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d @request.json -v --connect-timeout 5)
FILEDATA=$(echo $RESULT | jq -r '.filedata')
FILENAME=$(echo $RESULT | jq -r '.filename')
echo $FILENAME
echo $FILEDATA > $FILENAME
- name: Commit files # commit the output folder
uses: EndBug/add-and-commit@v9
with:
message: 'updated example output'
add: '*.* --force'
cwd: ${{env.WORKING_DIR}}