"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file ".github/workflows/format-validation.yml" between
pandoc-2.11.1.1.tar.gz and pandoc-2.11.2.tar.gz

About: Pandoc converts files from one markup format into another.

format-validation.yml  (pandoc-2.11.1.1):format-validation.yml  (pandoc-2.11.2)
skipping to change at line 12 skipping to change at line 12
on: on:
push: push:
branches: branches:
- '*' - '*'
- '!rc/*' - '!rc/*'
paths: paths:
- 'test/writer.jats_articleauthoring' - 'test/writer.jats_articleauthoring'
- 'test/writer.jats_publishing' - 'test/writer.jats_publishing'
- 'test/writer.jats_archiving' - 'test/writer.jats_archiving'
- 'test/tables.jats_archiving'
pull_request: pull_request:
branches: branches:
- '*' - '*'
- '!rc/*' - '!rc/*'
paths: paths:
- 'test/writer.jats_articleauthoring' - 'test/writer.jats_articleauthoring'
- 'test/writer.jats_publishing' - 'test/writer.jats_publishing'
- 'test/writer.jats_archiving' - 'test/writer.jats_archiving'
- 'test/tables.jats_archiving'
jobs: jobs:
jats: jats:
name: JATS name: JATS
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
VALIDATOR_URL: "https://jats-validator.hubmed.org/dtd/" VALIDATOR_URL: "https://jats-validator.hubmed.org/dtd/"
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
tagset: tagset:
- articleauthoring - articleauthoring
- publishing - publishing
- archiving - archiving
file:
- writer
# tables are not supported yet, the files contain only snippets.
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Validate - name: Validate writer output
run: | run: |
filename=test/${{ matrix.file }}.jats_${{ matrix.tagset }} filename=test/writer.jats_${{ matrix.tagset }}
printf "Validating file %s\n" "$filename" printf "Validating file %s\n" "$filename"
json="$(curl --form "xml=@${filename}" --silent "$VALIDATOR_URL")" json="$(curl --form "xml=@${filename}" --silent "$VALIDATOR_URL")"
err_count="$(echo "$json" | jq '.errors | length')" err_count="$(printf '%s' "$json" | jq '.errors | length')"
if [ "$err_count" -eq 0 ]; then if [ "$err_count" -eq 0 ]; then
printf "File was validated successfully.\n" printf "File was validated successfully.\n"
exit 0 exit 0
else else
printf "Validator report:\n%s" "$json" printf "Validator report:\n%s" "$json"
exit 1 exit 1
fi fi
- name: Validate tables
# Archiving has the simplest template, so we only check with that.
if: matrix.tagset == 'archiving'
run: |
tmpl="$(cat <<EOF
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving
and Interchange DTD v1.2 20190208//EN"
"JATS-archivearticle1.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="h
ttp://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other">
<front><article-meta></article-meta></front>
<body>%s</body></article>
EOF
)"
jats_file="$(mktemp jats-tables.XXXXX)"
printf "$tmpl" "$(cat test/tables.jats_archiving)" > "$jats_file"
json="$(curl --form "xml=@${jats_file}" --silent "$VALIDATOR_URL")"
err_count="$(printf "%s" "$json" | jq '.errors | length')"
if [ "$err_count" -eq 0 ]; then
printf "Table output is valid when used as body content.\n"
exit 0
else
printf "Validator report:\n%s" "$json"
exit 1
fi
 End of changes. 7 change blocks. 
6 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)