mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
CI action to check for changed schema
This commit is contained in:
parent
bb3512723f
commit
b9574a424b
2 changed files with 42 additions and 2 deletions
40
.github/workflows/model_rebuild.yml
vendored
Normal file
40
.github/workflows/model_rebuild.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Model Rebuild
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_models:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Install packages
|
||||
run: |
|
||||
python -m pip install ./nwb_schema_language
|
||||
python -m pip install ./nwb_linkml
|
||||
- name: Build models
|
||||
run: |
|
||||
python -m ./scripts/generate_core.py
|
||||
python -m ./scripts/generate_core.py --hdmf
|
||||
- name: Test for uncommitted changes
|
||||
run: |
|
||||
if [ -z "$(git status --porcelain)" ];
|
||||
then
|
||||
echo "No changes detected"
|
||||
exit 0
|
||||
else
|
||||
echo "Changes to models detected"
|
||||
echo "$(git status)"
|
||||
exit 1
|
||||
fi
|
||||
|
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install system libraries
|
||||
run: |
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
|||
sudo apt install -y libhdf5-dev hdf5-tools
|
||||
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
|
|
Loading…
Reference in a new issue