ENH: adopt sanitize_value from dandi-cli and use for sanitization of identifier #773
Workflow file for this run
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
name: Test that old schemata are not modified | |
on: | |
pull_request: | |
# Run whenever labels are modified, in addition to normal events: | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
if: contains(github.event.pull_request.labels.*.name, 'release') | |
steps: | |
- name: Checkout this repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Need history for `git describe` | |
path: dandischema | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install dandischema | |
run: python -m pip install . | |
working-directory: dandischema | |
- name: Checkout dandi/schema | |
uses: actions/checkout@v4 | |
with: | |
repository: dandi/schema | |
path: schema | |
- name: Test for unversioned changes | |
run: | | |
dirs="$(echo releases/*)" | |
echo "Following directories will be checked for differences: $dirs" | |
python ../dandischema/tools/pubschemata.py releases | |
git status | |
git add -A releases | |
if ! git diff --cached --exit-code $dirs | |
then echo "[ERROR] Existing schema files modified instead of creating a new version" | |
exit 1 | |
fi | |
working-directory: schema | |
# vim:set sts=2: |