Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: HypothesisWorks/hypothesis
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: hypothesis-python-6.21.0
Choose a base ref
...
head repository: HypothesisWorks/hypothesis
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: hypothesis-python-6.122.1
Choose a head ref
Loading
Showing 601 changed files with 48,315 additions and 16,359 deletions.
12 changes: 0 additions & 12 deletions .devcontainer/devcontainer.json

This file was deleted.

3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -15,3 +15,6 @@ ignore =
B008,B011,
# flake8-bandit security warnings we disagree with or don't mind
S101,S102,S105,S110,S307,S311,S404,S6
extend-select =
# enable checks for self-or-cls param name, use of raise-from
B902,B904
90 changes: 90 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Fuzzing

env:
# Tell pytest and other tools to produce coloured terminal output.
# Make sure this is also in the "passenv" section of the tox config.
PY_COLORS: 1

on:
# Run every six hours, for six hours each time
schedule:
- cron: '0 */6 * * *'
# Allow manual launching too so we can test any branch we like
workflow_dispatch:
# # Enable this and reduce the timeout below to check a PR is working
# pull_request:
# branches: [ master ]

jobs:
fuzz:
# Keep all of this stuff synced with the setup in main.yml for CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10.9"
- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.cache
~/wheelhouse
~/.local
vendor/bundle
.tox/
key: deps-${{ runner.os }}-${{ hashFiles('requirements/*.txt') }}-${{ matrix.task }}
restore-keys: |
deps-${{ runner.os }}-${{ hashFiles('requirements/*.txt') }}
deps-${{ runner.os }}
# OK, on to the fuzzing-specific part.
# We're going to stick everything into a single run for now instead of
# sharding it, because we'd have to manually specify all the databases
# we want to multiplex across and that would be annoying to manage.
# TODO: revisit this later; a redis-like service would be so much nicer.
- name: Download example database
uses: dawidd6/action-download-artifact@v2.24.3
with:
name: hypothesis-example-db
path: .hypothesis/examples
if_no_artifact_found: warn
workflow_conclusion: completed

- name: Install dependencies
run: |
pip install --upgrade setuptools pip wheel
pip install -r requirements/fuzzing.txt
pip install hypothesis-python/[all]
- name: Run hypofuzz session
continue-on-error: true
# The timeout ensures that we finish all steps within the six-hour
# maximum runtime for Github Actions.
# Then run the fuzzer on everything, as for our Windows CI; avoiding
# the --no-dashboard option because that also disables .patch writing.
run: |
timeout --preserve-status 5.5h \
hypothesis fuzz -- hypothesis-python/tests/ \
--ignore=hypothesis-python/tests/quality/ \
--ignore=hypothesis-python/tests/ghostwriter/
- name: Upload patch files with covering and failing `@example()`s
uses: actions/upload-artifact@v3
if: always()
with:
name: explicit-example-patches
path: .hypothesis/patches/latest_hypofuzz_*.patch

# Upload the database so it'll be persisted between runs.
# Note that we can also pull it down to use locally via
# https://hypothesis.readthedocs.io/en/latest/database.html#hypothesis.database.GitHubArtifactDatabase
- name: Upload example database
uses: actions/upload-artifact@v3
if: always()
with:
name: hypothesis-example-db
path: .hypothesis/examples
Loading