-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
102 additions
and
101 deletions.
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 |
---|---|---|
@@ -1,93 +1,94 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: test ${{ matrix.flags.name }} (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
rust: ["stable", "beta", "nightly", "1.65"] | ||
flags: ["--no-default-features", "", "--all-features"] | ||
exclude: | ||
# Skip because some features have highest MSRV. | ||
- rust: "1.65" # MSRV | ||
flags: "--all-features" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Install test binaries | ||
shell: bash | ||
run: ./.github/scripts/install_test_binaries.sh | ||
- name: Install nextest | ||
uses: taiki-e/install-action@nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: build | ||
if: ${{ matrix.rust == '1.65' }} # MSRV | ||
run: cargo build --workspace ${{ matrix.flags }} | ||
- name: test ${{ matrix.flags.flags }} | ||
shell: bash | ||
run: | | ||
cargo nextest run \ | ||
${{ matrix.flags.flags }} \ | ||
-E "!(kind(test))" \ | ||
--retries 2 | ||
test: | ||
name: test ${{ matrix.flags.name }} (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
rust: ["stable", "1.65"] | ||
flags: ["--no-default-features", "", "--all-features"] | ||
exclude: | ||
# Skip because some features have highest MSRV. | ||
- rust: "1.65" # MSRV | ||
flags: "--all-features" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Install test binaries | ||
shell: bash | ||
run: ./.github/scripts/install_test_binaries.sh | ||
- name: Install nextest | ||
uses: taiki-e/install-action@nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: build | ||
if: matrix.rust == '1.65' # MSRV | ||
run: cargo build --workspace ${{ matrix.flags }} | ||
- name: test | ||
if: matrix.rust != '1.65' # MSRV | ||
shell: bash | ||
run: | | ||
cargo nextest run \ | ||
${{ matrix.flags.flags }} \ | ||
-E "!(kind(test))" \ | ||
--retries 2 | ||
feature-checks: | ||
name: feature checks | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 45 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: taiki-e/install-action@cargo-hack | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: cargo hack | ||
run: cargo hack check --feature-powerset --depth 1 --all-targets | ||
feature-checks: | ||
name: feature checks | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 45 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: taiki-e/install-action@cargo-hack | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: cargo hack | ||
run: cargo hack check --feature-powerset --depth 1 --all-targets | ||
|
||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: clippy | ||
run: cargo clippy --workspace --all-features --all-targets | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: clippy | ||
run: cargo clippy --workspace --all-features --all-targets | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
|
||
docs: | ||
name: docs | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rust-docs | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: doc | ||
run: cargo doc --workspace --all-features --no-deps --document-private-items | ||
env: | ||
RUSTDOCFLAGS: "--cfg docsrs -D warnings" | ||
docs: | ||
name: docs | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rust-docs | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: doc | ||
run: cargo doc --workspace --all-features --no-deps --document-private-items | ||
env: | ||
RUSTDOCFLAGS: "--cfg docsrs -D warnings" | ||
|
||
fmt: | ||
name: fmt | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt | ||
- name: fmt --check | ||
run: cargo fmt --all --check | ||
fmt: | ||
name: fmt | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt | ||
- name: fmt --check | ||
run: cargo fmt --all --check |
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: deps | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
schedule: [cron: "00 00 * * *"] | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
schedule: [cron: "00 00 * * *"] | ||
|
||
jobs: | ||
cargo-deny: | ||
name: cargo deny check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check all | ||
cargo-deny: | ||
name: cargo deny check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check all |
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