Skip to content

Implemented HSTS

Implemented HSTS #84

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
# Cancel any in-progress run for the same branch / PR when a new commit arrives.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# Treat every rustc warning and every clippy lint as an error.
RUSTFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"
jobs:
check:
name: Check (fmt + clippy + doc)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
# SHA-pinned; toolchain set explicitly because the action otherwise
# derives it from the git ref, which is gone once we pin to a SHA.
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: cargo fmt
run: cargo fmt --check
- name: cargo clippy
# --all-targets covers lib, bins, examples, tests, and benchmarks.
run: cargo clippy --all-targets --features test-support
- name: cargo doc
run: cargo doc --no-deps
wasm:
name: Check (wasm32)
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
# Separate cache key so wasm artefacts don't pollute the native build cache.
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: wasm32
- name: cargo check (wasm32-unknown-unknown)
run: cargo check --target wasm32-unknown-unknown
test:
name: Test / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: check
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: cargo test
run: cargo test --features test-support
msrv:
name: MSRV (1.88)
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: "1.88"
# Separate cache key so the MSRV build artefacts don't pollute the
# stable build cache and vice-versa.
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: msrv-1.88
- name: cargo test
run: cargo test --features test-support