-
Notifications
You must be signed in to change notification settings - Fork 229
Add daily property tests #413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
845420f
Add daily property tests
MatthewMckee4 b121960
Update .github/workflows/daily_property_tests.yml
MatthewMckee4 66054a5
Update .github/workflows/daily_property_tests.yml
MatthewMckee4 b55a212
Update .github/workflows/daily_property_tests.yml
MatthewMckee4 7753f6b
tweak labels
AlexWaygood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Daily property test run | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 12 * * *" | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/daily_property_tests.yaml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| CARGO_INCREMENTAL: 0 | ||
| CARGO_NET_RETRY: 10 | ||
| CARGO_TERM_COLOR: always | ||
| RUSTUP_MAX_RETRIES: 10 | ||
| FORCE_COLOR: 1 | ||
|
|
||
| jobs: | ||
| property_tests: | ||
| name: Property tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| # Don't run the cron job on forks: | ||
| if: ${{ github.repository == 'astral-sh/ty' || github.event_name != 'schedule' }} | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| persist-credentials: false | ||
MatthewMckee4 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: "Install Rust toolchain" | ||
| run: rustup show | ||
| - name: "Install mold" | ||
| uses: rui314/setup-mold@e16410e7f8d9e167b74ad5697a9089a35126eb50 # v1 | ||
| - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 | ||
| - name: Build ty | ||
| working-directory: ruff | ||
| # A release build takes longer (2 min vs 1 min), but the property tests run much faster in release | ||
| # mode (1.5 min vs 14 min), so the overall time is shorter with a release build. | ||
| run: cargo build --locked --release --package ty_python_semantic --tests | ||
| - name: Run property tests | ||
| shell: bash | ||
| working-directory: ruff | ||
MatthewMckee4 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| run: | | ||
| export QUICKCHECK_TESTS=100000 | ||
| for _ in {1..5}; do | ||
| cargo test --locked --release --package ty_python_semantic -- --ignored list::property_tests | ||
| cargo test --locked --release --package ty_python_semantic -- --ignored types::property_tests::stable | ||
| done | ||
|
|
||
| create-issue-on-failure: | ||
| name: Create an issue if the daily property test run surfaced any bugs | ||
| runs-on: ubuntu-latest | ||
| needs: property_tests | ||
| if: ${{ github.repository == 'astral-sh/ty' && always() && github.event_name == 'schedule' && needs.property_tests.result == 'failure' }} | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| await github.rest.issues.create({ | ||
| owner: "astral-sh", | ||
| repo: "ty", | ||
| title: `Daily property test run failed on ${new Date().toDateString()}`, | ||
| body: "Run listed here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", | ||
| labels: ["bug", "testing"], | ||
| }) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.