-
Notifications
You must be signed in to change notification settings - Fork 10
37 lines (30 loc) · 1.19 KB
/
examples.yml
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
# Check that examples are same in LEMS and in jlems
name: Check LEMS examples
on:
push:
branches: [ master, development ]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 lems
uses: actions/checkout@v2
with:
repository: LEMS/LEMS
ref: ${{ steps.extract_branch.outputs.branch }}
path: LEMS
- name: check examples
run: |
for ex in "example1.xml" "example2.xml" "example3.xml" "example4.xml" "example5.xml" "example6.xml" "example7.xml" "example8.xml" "SimpleNetwork.xml" "SingleSimulation.xml" "elecdims.xml" "ex2dims.xml" "hhaltgate.xml" "hhcell.xml" "hhchannel.xml" "hhmodels.xml" "misciaf.xml" "spikegenerators.xml"; do
if ! diff -ur "LEMS/examples/$ex" "src/test/resources/$ex" ; then
echo "Example file $ex is not identical"
exit -1
fi
done