Skip to content

Bump actions/checkout from 3 to 4 #453

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #453

Workflow file for this run

name: Test and build
on: [push, pull_request, release]
jobs:
qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/[email protected]
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@v1
name: Check links in markdown files
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
test:
needs: qa
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
exclude:
- os: macos-latest
python-version: "3.11"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: guikit
- name: Check conda
run: conda info
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt -y install libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0 libgtk2.0-0
- name: Install MacOS dependencies
if: matrix.os == 'macos-latest'
run: conda install python.app
- name: Install dependencies
run: |
conda install pip
conda install wxPython -c conda-forge
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e .[dev]
- name: Test with pytest (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pytest
- name: Test with pytest (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
xvfb-run -a python -m pytest
- name: Test with pytest (MacOS)
if: matrix.os == 'macos-latest'
run: |
pythonw -m pytest
docs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build docs
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: |
python -m pip install --upgrade pip setuptools wheel
pip install -U sphinx myst-parser sphinx-autoapi sphinx-rtd-theme
build-command: sphinx-build -n -b html . ../build/html
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: startsWith(github.ref, 'refs/tags')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html