Reorganize package-handler support #254
This file contains hidden or 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: CI | |
| on: | |
| - push | |
| - pull_request | |
| - workflow_dispatch | |
| jobs: | |
| ci-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Python | |
| run: | | |
| # Install dependencies required to load ivpm.yaml file | |
| ./bootstrap.sh | |
| ./packages/python/bin/python3 -m pip install setuptools build --upgrade | |
| - name: Run Tests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| export PYTHONPATH=$(pwd)/src:$(pwd)/test | |
| cd test | |
| ../packages/python/bin/python3 -m unittest | |
| - name: Build Package | |
| run: | | |
| #sed -i -e "s/version = \"\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\"/version = \"\1.${GITHUB_RUN_ID}a1\"/g" pyproject.toml | |
| sed -i -e "s/version = \"\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\"/version = \"\1.${GITHUB_RUN_ID}\"/g" pyproject.toml | |
| ./packages/python/bin/python3 -m build . | |
| - name: Build Docs | |
| run: | | |
| ./packages/python/bin/python3 -m pip install sphinx sphinx-jsonschema sphinx-argparse sphinx-rtd-theme | |
| ./packages/python/bin/sphinx-build -M html ./docs/source build | |
| cp src/ivpm/share/ivpm.json build/html/ | |
| cp src/ivpm/share/ivpm.json build/html/ivpm.schema.json | |
| touch build/html/.nojekyll | |
| - name: Publish to PyPi | |
| if: ${{ startsWith(github.ref, 'refs/heads/master') }} | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| - name: Publish Docs | |
| if: ${{ startsWith(github.ref, 'refs/heads/master') }} | |
| uses: JamesIves/github-pages-deploy-action@4.1.7 | |
| with: | |
| branch: gh-pages | |
| folder: build/html | |