-
Notifications
You must be signed in to change notification settings - Fork 174
74 lines (65 loc) · 1.91 KB
/
property-based-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Run property based tests with Hypothesis
on:
schedule:
- cron: 0 20 * * *
workflow_dispatch:
env:
DAFT_ANALYTICS_ENABLED: '0'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ['3.8']
daft_runner: [py]
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-build
cache-all-crates: 'true'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Virtual Env
run: |
python -m venv venv
echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Build Rust Library
run: |
source activate
maturin develop --release
- name: Run Hypothesis property based tests
run: pytest tests/property_based_testing -m 'hypothesis' --hypothesis-seed=0
env:
DAFT_RUNNER: ${{ matrix.daft_runner }}
HYPOTHESIS_MAX_EXAMPLES: 10000
- name: Send Slack notification on failure
uses: slackapi/[email protected]
if: failure()
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":rotating_light: [NIGHTLY] Property-Based Tests <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow> *FAILED* :rotating_light:"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK