Merge pull request #1029 from AllenNeuralDynamics/release-v1.0.0 #14
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: Run checks in main and release | |
on: | |
push: | |
branches: | |
- '*release*' | |
jobs: | |
bump_versions_and_update_schemas: | |
runs-on: ubuntu-latest | |
env: | |
OUTPUT_DIR: 'schemas' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.SERVICE_TOKEN }} | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install -e .[dev] --no-cache-dir | |
- name: Bump schema versions | |
run: | | |
python -m aind_data_schema.utils.schema_version_bump | |
echo "Finished schema version bump" | |
- name: Update schemas | |
run: | | |
rm -rf $OUTPUT_DIR | |
python -m pip install -e . | |
python -m aind_data_schema.utils.json_writer --output $OUTPUT_DIR | |
- name: Create example schemas | |
run: | | |
cd examples | |
for script in ./*.py; do | |
python "$script" | |
done | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "bump schema version [skip actions]" | |
add: '["src", "schemas", "examples"]' | |
update_docs: | |
needs: bump_versions_and_update_schemas | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.SERVICE_TOKEN }} | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
sudo apt install graphviz libgraphviz-dev -y | |
python -m pip install -e .[dev] -e .[docs] --no-cache-dir | |
- name: Generate new rst files | |
run: | | |
sphinx-apidoc -o docs/source/ src | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "updates diagrams [skip actions]" | |
add: '["*.rst"]' |