-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: Update rust CI #215
Merged
Merged
Changes from all commits
Commits
Show all changes
5 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 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 |
---|---|---|
|
@@ -16,15 +16,12 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
|
||
- name: Check format | ||
run: | | ||
cargo fmt -- --check | ||
run: cargo fmt --check | ||
|
||
Linting: | ||
runs-on: ubuntu-latest | ||
|
@@ -35,19 +32,15 @@ jobs: | |
lfs: true | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
|
||
- name: Lint with clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
run: cargo clippy --no-deps # --all-targets --all-features | ||
|
||
Testing: | ||
needs: Formatting | ||
needs: [Formatting, Linting] | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
|
@@ -79,6 +72,9 @@ jobs: | |
with: | ||
lfs: 'true' | ||
|
||
- name: Install host libraries | ||
run: sudo apt-get install -y libsqlite3-dev libsqlite3-0 | ||
|
||
- name: Import test database. | ||
run: | | ||
set -euo pipefail | ||
|
@@ -89,18 +85,17 @@ jobs: | |
PGPASSWORD: uta_admin | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: llvm-tools-preview # needed for cargo llvm-cov | ||
|
||
- uses: Swatinem/[email protected] | ||
|
||
- name: Run cargo-tarpaulin with fast tests | ||
uses: actions-rs/[email protected] | ||
with: | ||
version: 0.21.0 | ||
args: "-- --test-threads 1" | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Run cargo-llvm-cov with fast tests | ||
run: cargo llvm-cov --lcov --output-path lcov.info -- --test-threads 1 | ||
env: | ||
TEST_UTA_DATABASE_URL: postgres://uta_admin:[email protected]/uta | ||
TEST_UTA_DATABASE_SCHEMA: uta_20210129 | ||
|
@@ -109,10 +104,7 @@ jobs: | |
if: ${{ matrix.label == 'fast' }} | ||
|
||
- name: Run cargo-test with full tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: "--release -- --include-ignored" | ||
run: "cargo test --release -- --include-ignored" | ||
env: | ||
TEST_UTA_DATABASE_URL: postgres://uta_admin:[email protected]/uta | ||
TEST_UTA_DATABASE_SCHEMA: uta_20210129 | ||
|
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.
💡 Codebase verification
🛠️ Refactor suggestion
Restore comprehensive clippy checks for better coverage
The codebase has multiple components that justify using
--all-targets --all-features
:translate_cds
)🔗 Analysis chain
Consider restoring comprehensive clippy checks
The simplified clippy command removes
--all-targets --all-features
flags (as seen in the comment). This might reduce the scope of linting coverage.Let's check if these flags are important for your codebase:
Consider restoring these flags for comprehensive checking:
The previous output showed we have benches, lib, and multiple source files. Let's examine the Cargo.toml to understand the project structure and features better, and specifically look for test files to determine if
--all-targets
would be beneficial.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 852
Script:
Length of output: 1329