Skip to content

Hypothesis Tests

Hypothesis Tests #846

Workflow file for this run

name: Hypothesis Tests
on:
workflow_dispatch:
schedule:
# min hour dom month dow
- cron: '0 6 * * 3'
env:
python_version: '3.12'
permissions:
issues: write
jobs:
hypothesis:
runs-on: ubuntu-22.04
container: fedora:39
timeout-minutes: 60
steps:
- name: Install Linux Dependencies
run: >
dnf install -y gcc git graphviz pkg-config python-launcher upx
mutter dbus-x11 gtk4 gobject-introspection-devel
cairo-gobject-devel gtksourceview5-devel libadwaita-devel cairo-devel
python${{ env.python_version }}-devel
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set ownership of checkout directory
run: chown -R $(id -u):$(id -g) $PWD
- name: Use Python Dependency Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-39
- name: Use Hypothesis Cache
id: restore-cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: .hypothesis
key: ${{ runner.os }}-hypothesis
- name: Install Dependencies
uses: ./.github/actions/install
with:
python-command: python${{ env.python_version }}
- name: Test with Hypothesis
env:
XDG_RUNTIME_DIR: /tmp
run: |
eval $(dbus-launch --auto-syntax)
mutter --wayland --no-x11 --sm-disable --headless -- poetry run pytest -m hypothesis --hypothesis-profile=ci tests/test_model_consistency.py
- name: Create Issue on Failure
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/hypothesis-test-failed.md
update_existing: true
- name: Save cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
if: always()
with:
path: .hypothesis
key: steps.restore-cache.output.key