Update Rust crate tokio to v1.41.0 #346
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
name: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
RUST_BACKTRACE: 1 | |
jobs: | |
pre_ci: | |
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master | |
ensure_api_key_set: | |
needs: pre_ci | |
runs-on: ubuntu-latest | |
steps: | |
- if: ${{ env.API_KEY == '' }} | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.setFailed('API_KEY secret must be defined!') | |
test: | |
name: Rust ${{matrix.rust}} ${{matrix.os}} | |
needs: ensure_api_key_set | |
if: needs.pre_ci.outputs.continue | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
rust: nightly | |
- os: ubuntu-latest | |
rust: beta | |
- os: ubuntu-latest | |
rust: 1.71.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/setup-nasm@v1 | |
if: matrix.os == 'windows-latest' | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
- run: cargo test | |
format: | |
name: Format Check And Linting | |
needs: pre_ci | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo fmt -- --check | |
- run: cargo clippy | |
# outdated: | |
# name: Outdated | |
# needs: pre_ci | |
# runs-on: ubuntu-latest | |
# if: github.event_name != 'pull_request' | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: dtolnay/rust-toolchain@stable | |
# - uses: dtolnay/install@cargo-outdated | |
# - run: cargo outdated --workspace --exit-code 1 | |
doc: | |
name: Documentation | |
needs: pre_ci | |
if: needs.pre_ci.outputs.continue | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: dtolnay/install@cargo-docs-rs | |
- run: cargo docs-rs -p openweathermap_client |