-
-
Notifications
You must be signed in to change notification settings - Fork 14
ci: add scheduled property-test workflow #107
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 all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e8ae89f
ci: add scheduled property-test workflow
mkaput 406c600
Remove timeout for proptest job
mkaput 11745cf
test: make property max runs configurable
mkaput 38c1125
refactor(test): simplify property max-runs parsing
mkaput e386c6d
refactor(test): inline property max-runs env parsing
mkaput b0051ce
fmt
mkaput 8c118ce
fmt
mkaput 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
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: Property Tests | ||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| concurrency: | ||
| group: proptest | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| proptest: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| SPITFIRE_PROPERTY_MAX_RUNS: "250000" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: DeterminateSystems/nix-installer-action@main | ||
| - uses: cachix/cachix-action@v14 | ||
| with: | ||
| name: elixir-tools | ||
| authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
|
|
||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| deps | ||
| _build | ||
| key: ${{ runner.os }}-mix-${{ hashFiles('**/.mise.toml') }}-${{ hashFiles('**/mix.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-mix-${{ hashFiles('**/.mise.toml') }}- | ||
|
|
||
| - name: Install Dependencies | ||
| run: nix develop --command bash -c "mix deps.get" | ||
|
|
||
| - name: Run property tests | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| nix develop --command bash -c "mix test --only property" 2>&1 | tee property-test.log | ||
|
|
||
| - name: Build failure report | ||
| if: ${{ failure() }} | ||
| shell: bash | ||
| run: | | ||
| { | ||
| echo "## Property tests failed" | ||
| echo "" | ||
| echo "- Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
| echo "- Branch: \`${{ github.ref_name }}\`" | ||
| echo "- Commit: \`${{ github.sha }}\`" | ||
| echo "- Trigger: \`${{ github.event_name }}\`" | ||
| echo "" | ||
| echo "### Log tail" | ||
| echo '```text' | ||
| tail -n 400 property-test.log || true | ||
| echo '```' | ||
| } > property-test-failure.md | ||
|
|
||
| - name: Open issue on failure | ||
| if: ${{ failure() }} | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| gh issue create \ | ||
| --repo "${{ github.repository }}" \ | ||
| --title "Property tests failed (run #${{ github.run_number }})" \ | ||
| --body-file property-test-failure.md | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as I typed in special considerations, I'm afraid of doing this as it might generate too much spam issues. we need to see how this works live |
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets still run the properties here, just run them with the smaller max runs value.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I disagree - this will keep the havoc with proptests spuriously breaking random PR unit tests