Skip to content

Update .readthedocs.yaml #13

Update .readthedocs.yaml

Update .readthedocs.yaml #13

Workflow file for this run

name: PiSCAT Test and Deployment
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
permissions:
contents: read
name: ${{matrix.os}} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [MacOS, Ubuntu, Windows]
python-version: ['3.8', '3.10']
exclude:
- os: MacOS
python-version: '3.8'
env:
DISPLAY: :0 # Tell Xvfb which virtual display to use.
QT_DEBUG_PLUGINS: 1 # Improve Qt debugging experience.
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Set up Xvfb
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libopengl0 libegl1-mesa
sudo Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Setup Python Environment
run: |
python -m pip install --upgrade pip pipenv setuptools wheel
python -m pip install -e .[test]
python -m pip freeze
- name: Run Test Suite
run: |
pytest --cov=piscat --cov-report html:htmlcov --cov-report term
deploy:
if: (github.repository == 'SandoghdarLab/PiSCAT') && (github.ref == 'refs/heads/master')
needs: test
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './htmlcov/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1