- Notifications
You must be signed in to change notification settings - Fork47
chore(ci): Expand Workflows#60
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
4 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
49 changes: 49 additions & 0 deletions.github/workflows/audit.yml
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,49 @@ | ||
| name: Security audit | ||
| permissions: | ||
| contents: read | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '**/Cargo.toml' | ||
| - '**/Cargo.lock' | ||
| push: | ||
| branches: | ||
| - master | ||
| env: | ||
| RUST_BACKTRACE: 1 | ||
| CARGO_TERM_COLOR: always | ||
| CLICOLOR: 1 | ||
| jobs: | ||
| security_audit: | ||
| permissions: | ||
| issues: write # to create issues (actions-rs/audit-check) | ||
| checks: write # to create check (actions-rs/audit-check) | ||
| runs-on: ubuntu-latest | ||
| # Prevent sudden announcement of a new advisory from failing ci: | ||
| continue-on-error: true | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - uses: actions-rs/audit-check@v1 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| cargo_deny: | ||
| permissions: | ||
| issues: write # to create issues (actions-rs/audit-check) | ||
| checks: write # to create check (actions-rs/audit-check) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| checks: | ||
| - bans licenses sources | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: EmbarkStudios/cargo-deny-action@v1 | ||
| with: | ||
| command: check ${{ matrix.checks }} | ||
| rust-version: stable |
142 changes: 130 additions & 12 deletions.github/workflows/ci.yml
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 |
|---|---|---|
| @@ -1,24 +1,142 @@ | ||
| name: CI | ||
| permissions: | ||
| contents: read | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
| env: | ||
| RUST_BACKTRACE: 1 | ||
| CARGO_TERM_COLOR: always | ||
| CLICOLOR: 1 | ||
| jobs: | ||
| ci: | ||
| permissions: | ||
| contents: none | ||
| name: CI | ||
| needs: [test, msrv, docs, rustfmt, clippy] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Done | ||
| run: exit 0 | ||
| test: | ||
| name: Test | ||
| strategy: | ||
| matrix: | ||
| os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
| rust: ["stable"] | ||
| continue-on-error: ${{ matrix.rust != 'stable' }} | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: ${{ matrix.rust }} | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Build | ||
| run: cargo test --no-run --workspace --all-features | ||
| - name: Default features | ||
| run: cargo test --workspace | ||
| - name: All features | ||
| run: cargo test --workspace --all-features | ||
| - name: No-default features | ||
| run: cargo test --workspace --no-default-features | ||
| msrv: | ||
| name: "Check MSRV: 1.70" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: "1.70" # MSRV | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Default features | ||
| run: cargo check --workspace --all-targets | ||
| - name: All features | ||
| run: cargo check --workspace --all-targets --all-features | ||
| - name: No-default features | ||
| run: cargo check --workspace --all-targets --no-default-features | ||
| lockfile: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: "Is lockfile updated?" | ||
| run: cargo fetch --locked | ||
| docs: | ||
| name: Docs | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Check documentation | ||
| env: | ||
| RUSTDOCFLAGS: -D warnings | ||
| run: cargo doc --workspace --all-features --no-deps --document-private-items | ||
| rustfmt: | ||
| name: rustfmt | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| # Not MSRV because its harder to jump between versions and people are | ||
| # more likely to have stable | ||
| toolchain: stable | ||
| components: rustfmt | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Check formatting | ||
| run: cargo fmt --all -- --check | ||
| clippy: | ||
| name: clippy | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write # to upload sarif results | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: "1.70" # MSRV | ||
| components: clippy | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Install SARIF tools | ||
| run: cargo install clippy-sarif --version 0.3.4 --locked # Held back due to msrv | ||
| - name: Install SARIF tools | ||
| run: cargo install sarif-fmt --version 0.3.4 --locked # Held back due to msrv | ||
| - name: Check | ||
| run: > | ||
| cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated | ||
| | clippy-sarif | ||
| | tee clippy-results.sarif | ||
| | sarif-fmt | ||
| continue-on-error: true | ||
| - name: Upload | ||
| uses: github/codeql-action/upload-sarif@v2 | ||
| with: | ||
| sarif_file: clippy-results.sarif | ||
| wait-for-processing: true | ||
| - name: Report status | ||
| run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated |
59 changes: 59 additions & 0 deletions.github/workflows/rust-next.yml
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,59 @@ | ||
| name: rust-next | ||
| permissions: | ||
| contents: read | ||
| on: | ||
| schedule: | ||
| - cron: '1 1 1 * *' | ||
| env: | ||
| RUST_BACKTRACE: 1 | ||
| CARGO_TERM_COLOR: always | ||
| CLICOLOR: 1 | ||
| jobs: | ||
| test: | ||
| name: Test | ||
| strategy: | ||
| matrix: | ||
| os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
| rust: ["stable", "beta"] | ||
| include: | ||
| - os: ubuntu-latest | ||
| rust: "nightly" | ||
| continue-on-error: ${{ matrix.rust != 'stable' }} | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: ${{ matrix.rust }} | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Default features | ||
| run: cargo test --workspace | ||
| - name: All features | ||
| run: cargo test --workspace --all-features | ||
| - name: No-default features | ||
| run: cargo test --workspace --no-default-features | ||
| latest: | ||
| name: "Check latest dependencies" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Update dependencues | ||
| run: cargo update | ||
| - name: Default features | ||
| run: cargo test --workspace --all-targets | ||
| - name: All features | ||
| run: cargo test --workspace --all-targets --all-features | ||
| - name: No-default features | ||
| run: cargo test --workspace --all-targets --no-default-features |
4 changes: 1 addition & 3 deletions.gitignore
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 |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| target |
30 changes: 0 additions & 30 deletions.travis.yml
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.