Increment version #150
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: cmdx-workflow | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
maya: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
# Without this, all containers stop if any fail | |
# That's bad, we want to know whether it's only one | |
# or if it happens to multiples or all. | |
fail-fast: false | |
matrix: | |
include: | |
- maya: "2018" | |
pip: "2.7/get-pip.py" | |
- maya: "2019" | |
pip: "2.7/get-pip.py" | |
- maya: "2020" | |
pip: "2.7/get-pip.py" | |
- maya: "2022" | |
pip: "get-pip.py" | |
- maya: "2023" | |
pip: "get-pip.py" | |
- maya: "2024" | |
pip: "get-pip.py" | |
container: mottosso/maya:${{ matrix.maya }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
# We'll lock each version to one that works with both Python 2.7 and 3.7 | |
- name: pip install | |
run: | | |
wget https://bootstrap.pypa.io/pip/${{ matrix.pip }} | |
mayapy get-pip.py --user | |
mayapy -m pip install --user \ | |
nose==1.3.7 \ | |
nose-exclude==0.5.0 \ | |
coverage==5.5 \ | |
flaky==3.7.0 \ | |
docutils==0.17.1 \ | |
sphinx==1.8.5 \ | |
sphinxcontrib-napoleon==0.7 | |
# Since 2019, this sucker throws an unnecessary warning if not declared | |
- name: Environment | |
run: | | |
export XDG_RUNTIME_DIR=/var/tmp/runtime-root | |
export MAYA_DISABLE_ADP=1 | |
- name: Unittests | |
run: | | |
pwd | |
ls | |
mayapy --version | |
mayapy run_tests.py | |
- name: Test docs | |
run: | | |
mayapy build_livedocs.py && mayapy test_docs.py | |
- name: Build docs | |
run: | | |
mayapy build_docs.py | |
# We only upload the docs if the Maya version is 2022 as we only need one copy | |
- name: Upload docs as artifact | |
if: ${{ matrix.maya == '2022' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docs | |
path: ./build/html | |
deploy: | |
runs-on: ubuntu-latest | |
if: contains(github.ref, 'refs/tags/') | |
needs: maya | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload dist/* | |
docs: | |
runs-on: ubuntu-latest | |
if: contains(github.ref, 'refs/tags/') | |
needs: maya | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download built docs | |
uses: actions/download-artifact@v2 | |
with: | |
name: docs | |
path: ./public | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |