remove deploy documentation to /documentation #1872
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: Tests | |
on: | |
# Run this workflow every time a new commit is pushed to or a pull request is created from one of these branches | |
push: | |
branches: [main, "stable/*"] | |
pull_request: | |
branches: [main, "stable/*"] | |
jobs: | |
# NOTE: The ubuntu-22.04 and macos-latest tests have been separated out because ubuntu | |
# requires installing some additional libraries (libglu1-mesa) for Gmsh to run. Please | |
# consider this aspect before combining the tests for both the OS platforms. | |
ubuntu-tests: | |
# Name the Job | |
name: tests-python${{ matrix.python-version }}-ubuntu-latest | |
# Set the type of machine to run on | |
runs-on: ubuntu-22.04 | |
# Set matrix for runs-on | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ubuntu-latest-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements-dev.txt','requirements.txt') }} | |
restore-keys: | | |
ubuntu-latest-${{ matrix.python-version }}-pip-tests- | |
ubuntu-latest-${{ matrix.python-version }}-pip- | |
ubuntu-latest-${{ matrix.python-version }} | |
- name: Install Deps | |
run: | | |
python -m pip install -U tox==4.11.0 setuptools==67.3.1 virtualenv==20.24.3 wheel==0.38.4 | |
sudo apt install libglu1-mesa=9.0.2-1 libglu1-mesa-dev=9.0.2-1 | |
- name: Install and Run Tests | |
run: tox -e py | |
macos-tests: | |
# Name the Job | |
name: tests-python${{ matrix.python-version }}-macOS-latest | |
# Set the type of machine to run on | |
runs-on: macos-12 | |
# Set matrix for runs-on | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10"] | |
steps: | |
- name: Chekout code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: macOS-latest-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements-dev.txt','requirements.txt') }} | |
restore-keys: | | |
macOS-latest-${{ matrix.python-version }}-pip-tests- | |
macOS-latest-${{ matrix.python-version }}-pip- | |
macOS-latest-${{ matrix.python-version }} | |
- name: Install Deps | |
run: python -m pip install -U tox==4.11.0 setuptools==67.3.1 virtualenv==20.24.3 wheel==0.38.4 | |
- name: Install and Run Tests | |
run: tox -e py | |
windows-tests: | |
name: tests-python${{ matrix.python-version }}-windows | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements-dev.txt','requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-pip-tests- | |
${{ runner.os }}-${{ matrix.python-version }}-pip- | |
${{ runner.os }}-${{ matrix.python-version }}- | |
- name: Install deps | |
run: | | |
python -m pip install -U tox==4.11.0 cvxopt==1.3.0 setuptools==67.3.1 virtualenv==20.24.3 wheel==0.38.4 | |
shell: pwsh | |
- name: Install and Run Tests | |
run: tox --sitepackages -e py | |
shell: bash -l {0} | |
lint: | |
name: lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-lint-${{ hashFiles('setup.py','requirements-dev.txt','requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-pip-lint- | |
${{ runner.os }}-${{ matrix.python-version }}-pip- | |
${{ runner.os }}-${{ matrix.python-version }}- | |
- name: Install Deps | |
run: python -m pip install -U tox==4.11.0 | |
- name: Run lint | |
run: tox -elint | |
docs: | |
name: docs | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-docs-${{ hashFiles('setup.py','requirements-dev.txt','requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-docs- | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install Deps | |
run: | | |
python -m pip install -U tox==4.11.0 | |
sudo apt update | |
sudo apt install -y graphviz=2.42.2-6 pandoc=2.9.2.1-3ubuntu2 qtbase5-dev=5.15.3+dfsg-2ubuntu0.2 qt5-qmake=5.15.3+dfsg-2ubuntu0.2 | |
- name: Build Docs | |
run: tox -edocs | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: html_docs | |
path: docs/_build/html |