Fixes for exported data #144
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: 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 | |
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 | |
./packages/python/bin/python3 -m build . | |
- name: Build Docs | |
run: | | |
./packages/python/bin/sphinx-build -M html ./doc/source build | |
cp src/ivpm/share/ivpm.json build/html/ | |
touch build/html/.nojekyll | |
- name: Publish to PyPi | |
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/ext-source-type') }} | |
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') || startsWith(github.ref, 'refs/heads/ext-source-type') }} | |
uses: JamesIves/github-pages-deploy-action@4.1.7 | |
with: | |
branch: gh-pages | |
folder: build/html | |