Python CI #111
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: Python CI | |
| on: | |
| schedule: | |
| - cron: '0 0 * * SUN' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ./python-client-sphinx | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: appium/python-client | |
| path: ./python-client | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Setup python-client | |
| run: | | |
| pip install --user pipenv | |
| python -m pipenv lock --clear | |
| python -m pipenv install --dev --system | |
| python -m pip install setuptools | |
| python setup.py install | |
| working-directory: python-client | |
| - name: Build doc | |
| shell: bash -xe {0} | |
| run: | | |
| python -m pip install -r requirements.txt | |
| bash generate.sh | |
| working-directory: python-client/docs | |
| - name: Check if PR needed | |
| shell: bash -xe {0} | |
| run: | | |
| rm -r docs | |
| cp -r ../python-client/docs/_build/html ./docs | |
| git --no-pager diff --stat | |
| if (git --no-pager diff --stat | grep -q "docs/_sources/index.rst.txt | 2 +-"); then exit 1; fi | |
| working-directory: python-client-sphinx | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v3 | |
| with: | |
| path: ./python-client-sphinx |