Skip to content

replace actions-rs #100

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

Merged
merged 2 commits into from
Dec 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,6 @@ jobs:
steps:
- name: Done
run: exit 0
security-audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
cargo-deny:
name: Cargo Deny
runs-on: ubuntu-latest
Expand All @@ -42,7 +27,7 @@ jobs:
- licenses
- sources
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: EmbarkStudios/cargo-deny-action@v1
Expand Down
52 changes: 13 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,72 +40,46 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
override: true
- uses: Swatinem/rust-cache@v2
- name: Test twitch_oauth2
uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --features "${{ env.CI_TWITCH_OAUTH2_FEATURES }}" --workspace
run: cargo test --all-targets --features "${{ env.CI_TWITCH_OAUTH2_FEATURES }}" --workspace
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: Run fmt --all -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --locked
run: cargo clippy --locked
- name: Run clippy --all-targets --all-features --workspace
uses: actions-rs/cargo@v1
with:
command: clippy
args: --locked --all-targets --all-features --workspace
run: cargo clippy --locked --all-targets --all-features --workspace
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
# We do the following to make sure docs.rs can document properly without anything broken, and that docs are working.
- name: Run doc tests
uses: actions-rs/cargo@v1
with:
command: test
args: --doc --all-features
run: cargo test --doc --all-features
- name: Check twitch_oauth2 docs
run: cargo xtask doc
8 changes: 2 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: build twitch_oauth2 docs
run: cargo xtask doc
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ required-features = ["reqwest", "mock_api"]
[package.metadata.docs.rs]
features = ["all", "mock_api"]
rustc-args = ["--cfg", "nightly"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
2 changes: 1 addition & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn main() -> color_eyre::Result<()> {
}
cmd!(
sh,
"cargo doc --target-dir {target_dir} --no-deps --features {TWITCH_OAUTH2_FEATURES} -Zunstable-options -Zrustdoc-scrape-examples=examples {last...}"
"cargo doc --target-dir {target_dir} --no-deps --features {TWITCH_OAUTH2_FEATURES} -Zunstable-options -Zrustdoc-scrape-examples {last...}"
)
.run()?;
}
Expand Down