Merge pull request #81 from LEMS/test_mac14 #76
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
# Check that examples are same in pylems and in jlems | |
name: Check LEMS examples | |
on: | |
push: | |
branches: [ master, development, experimental ] | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nelonoel/[email protected] | |
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Checkout jlems | |
uses: actions/checkout@v4 | |
with: | |
repository: LEMS/jLEMS | |
ref: ${{ steps.extract_branch.outputs.branch }} | |
path: jlems | |
- name: check examples | |
run: | | |
for ex in "example1.xml" "example2.xml" "example3.xml" "example4.xml" "example5.xml" "example6.xml" "example7.xml" "example8.xml" "bounce-conditional.xml" ; do | |
if ! diff -ur "examples/$ex" "jlems/src/test/resources/$ex" ; then | |
echo "Example file $ex is not identical" | |
exit -1 | |
fi | |
done |