-
Notifications
You must be signed in to change notification settings - Fork 3
integration tests #30
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,56 @@ | ||||||
| name: CI | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| branches: | ||||||
| - main | ||||||
| pull_request: | ||||||
| branches: | ||||||
| - main | ||||||
|
|
||||||
| jobs: | ||||||
| test: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Install Rust toolchain | ||||||
| uses: dtolnay/rust-toolchain@stable | ||||||
|
|
||||||
| - name: Setup Rust caching | ||||||
| uses: Swatinem/rust-cache@v2 | ||||||
|
|
||||||
| - name: Check formatting | ||||||
| run: cargo fmt -- --check | ||||||
|
|
||||||
| - name: Run clippy | ||||||
| run: cargo clippy -- -D warnings | ||||||
|
|
||||||
| - name: Run tests | ||||||
| run: cargo test -- --test-threads=1 | ||||||
|
|
||||||
| - name: Build release | ||||||
| run: cargo build --release | ||||||
|
|
||||||
| coverage: | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Install Rust toolchain | ||||||
| uses: dtolnay/rust-toolchain@stable | ||||||
|
|
||||||
| - name: Install tarpaulin | ||||||
| run: cargo install cargo-tarpaulin | ||||||
|
|
||||||
| - name: Generate coverage | ||||||
| run: cargo tarpaulin --out Xml --timeout 300 -- --test-threads=1 | ||||||
|
|
||||||
| - name: Upload coverage to Codecov | ||||||
| uses: codecov/codecov-action@v3 | ||||||
|
||||||
| uses: codecov/codecov-action@v3 | |
| uses: codecov/codecov-action@v4 |
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.
Installing cargo-tarpaulin on every coverage run is time-consuming. Consider either using a Docker image with tarpaulin pre-installed, caching the installation, or using the latest actions/cache for the cargo bin directory. Alternatively, consider using cargo-llvm-cov which is generally faster and more actively maintained.