Skip to content

feat: Add title and description to chat badges #1883

feat: Add title and description to chat badges

feat: Add title and description to chat badges #1883

Workflow file for this run

name: CI
env:
CI_TWITCH_API_FEATURES: "twitch_oauth2/all all unsupported deny_unknown_fields ureq"
MSRV: 1.77.0
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [main]
merge_group:
types: [checks_requested]
jobs:
ci:
name: CI
needs: [test, rustfmt, prettier, clippy, docs, release]
runs-on: ubuntu-latest
if: always()
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0
release:
name: Release
runs-on: ubuntu-latest
needs: [test, rustfmt, clippy, docs]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # fetch tags for publish
# ssh-key: "${{ secrets.COMMIT_KEY }}" # use deploy key to trigger workflow on tag
- uses: Swatinem/rust-cache@v2
- run: cargo xtask release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
test:
name: Tests
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
rust: ["", nightly]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust || env.MSRV }}
- uses: Swatinem/rust-cache@v2
- name: Test twitch_api
run: cargo test --locked --all-targets --features "${{ env.CI_TWITCH_API_FEATURES }}" ${{matrix.rust == 'nightly' && '--workspace' || ''}}
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- name: Run fmt -- --check
run: cargo fmt -- --check
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check formatting with Prettier
# Explicit commit, because this isn't tagged yet.
uses: actionsx/prettier@3d9f7c3fa44c9cb819e68292a328d7f4384be206
with:
args: -c .
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --locked --all-targets --no-default-features -p twitch_api
- run: cargo clippy --locked --all-targets --no-default-features --features "helix" -p twitch_api
- run: cargo clippy --locked --all-targets --no-default-features --features "helix client" -p twitch_api
- run: cargo clippy --locked --all-targets --no-default-features --features "pubsub" -p twitch_api
- run: cargo clippy --locked --all-targets --no-default-features --features "eventsub" -p twitch_api
- run: cargo clippy --locked --all-targets --features "${{ env.CI_TWITCH_API_FEATURES }} trace_unknown_fields" -p twitch_api
- run: cargo clippy --locked --all-targets --features "${{ env.CI_TWITCH_API_FEATURES }} _all" -p twitch_api
- run: cargo clippy --locked --all-targets --all-features --workspace
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@master
with:
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
run: cargo test --doc --features "${{ env.CI_TWITCH_API_FEATURES }} _all"
- name: Check twitch_api docs
run: cargo xtask doc