Skip to content

Commit

Permalink
removed old travis file and added actions file and added readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreycwitt committed Jan 10, 2025
1 parent d6be847 commit c115ae3
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 18 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# make sure java is avaialbe
- uses: actions/setup-java@v2
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'

# Runs a single command using the runners shell
- name: get jing
run: wget 'https://github.com/papyri/jing-trang/releases/download/xsd_bce_leap_years-1.0/jing.jar'

# Runs a set of commands using the runners shell
- name: get lbp schemas and save to directory
run: mkdir -p schema/

- name: get critical schema
run: wget -O schema/critical.rng 'https://raw.githubusercontent.com/lombardpress/lombardpress-schema/1.0.0/src/out/critical.rng'

- name: get diplomatic
run: wget -O schema/diplomatic.rng 'https://raw.githubusercontent.com/lombardpress/lombardpress-schema/1.0.0/src/out/diplomatic.rng'

- name: get tdf
run: wget -O schema/tdf.rng 'https://raw.githubusercontent.com/scta/tdf-schema/master/src/tdf-0.rng'

# Runs check
- name: run validation checks
run: |
for file in */*.xml;
do
echo "start";
echo $file;
if [[ $(grep -o "lbp-.*-1.0.0" $file) ]];
then schema=$(grep -o "lbp-.*-1.0.0" $file);
else
schema="none"
fi;
echo "schema before conditionals"
echo $schema;
if [[ $file = *"transcriptions.xml"* ]];
then echo $file;
elif [[ $schema = *"diplomatic"* ]];
then echo "checking diplomatic for $file";
java -jar jing.jar schema/diplomatic.rng $file;
if [[ $? -ne 0 ]];
then exit 1;
fi;
elif [[ $schema = *"critical"* ]];
then echo "checking critical for $file";
java -jar jing.jar schema/critical.rng $file;
if [[ $? -ne 0 ]];
then exit 1;
fi;
else
echo "nothing run";
fi;
echo $?;
done;
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[![CI](https://github.com/scta-texts/cv8jk9/actions/workflows/validation.yml/badge.svg?branch=master)](https://github.com/scta-texts/cv8jk9/actions/workflows/validation.yml)

# Repo for AboutLambertus Daneau's Commentary on Lombard's Sentences.

0 comments on commit c115ae3

Please sign in to comment.