diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2020-10-31 22:48:12 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2020-10-31 22:59:35 +0100 |
commit | b0a072537b97927f84bfcc550381c5f978b89536 (patch) | |
tree | 3a4d33b259fe252a195849c05f8a5a54cfbd8989 /.github/workflows | |
parent | 7af608b21485de3dc21bbbdedfc50605f34e6027 (diff) | |
download | pandoc-b0a072537b97927f84bfcc550381c5f978b89536.tar.gz |
CI: improve JATS format validator workflow
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/format-validation.yml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/.github/workflows/format-validation.yml b/.github/workflows/format-validation.yml index 5928d0376..1c0060cf8 100644 --- a/.github/workflows/format-validation.yml +++ b/.github/workflows/format-validation.yml @@ -2,15 +2,21 @@ name: Format validation on: push: - paths-ignore: + branches: - '*' - - '!/test/writer.*' - - '!/test/tables.*' + - '!rc/*' + paths: + - 'test/writer.jats_articleauthoring' + - 'test/writer.jats_publishing' + - 'test/writer.jats_archiving' pull_request: - paths-ignore: + branches: - '*' - - '!/test/writer.*' - - '!/test/tables.*' + - '!rc/*' + paths: + - 'test/writer.jats_articleauthoring' + - 'test/writer.jats_publishing' + - 'test/writer.jats_archiving' jobs: jats: @@ -35,11 +41,11 @@ jobs: - name: Validate run: | filename=test/${{ matrix.file }}.jats_${{ matrix.tagset }} - echo "$filename" + printf "Validating file %s\n" "$filename" json="$(curl --form "xml=@${filename}" --silent "$VALIDATOR_URL")" - echo "$json" err_count="$(echo "$json" | jq '.errors | length')" if [ "$err_count" -eq 0 ]; then + printf "File was validated successfully.\n" exit 0 else printf "Validator report:\n%s" "$json" |