-
Notifications
You must be signed in to change notification settings - Fork 5
Add github action to make sure rust tests are happy #47
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,42 @@ | ||
| name: PR checks | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/pr_checks_rs.yaml' | ||
| - 'rust/**/*.rs' | ||
| - 'rust/**/Cargo.toml' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.ref }} | ||
| cancel-in-progress: true | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Tests | ||
| runs-on: self-hosted | ||
|
|
||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # This dependency cache allows us to skip downloading and rebuilding dependencies. It saves us a lot of time. | ||
| # Since we're using self-hosted runners, it would be interesting to try sharing attached storage instead of | ||
| # using this over-network cache | ||
| - name: Rust Cache | ||
| uses: Swatinem/[email protected] | ||
| with: | ||
| prefix-key: 'v1-rust' | ||
| # regardless of the 'shared-key', env vars, and cargo lock files are *always* automatically added to the cache key | ||
| # https://github.com/Swatinem/rust-cache/blob/v2.7.5/src/config.ts#L51 | ||
| shared-key: "pro-sdk" | ||
| # this causes painfully slow (~3 min) cache uploading the first time dependencies are updated | ||
| # it saves more than that on all future builds, so it's worth the 1 time cost | ||
| cache-targets: true | ||
| # github does not allow branches to access caches that aren't from the main branch so there's no point in publishing them | ||
| save-if: ${{ github.ref == 'refs/heads/main' }} | ||
|
|
||
| - name: Run doc and unit tests | ||
| run: cargo test --doc --workspace && cargo test --lib --workspace | ||
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.
Uh oh!
There was an error while loading. Please reload this page.