Skip to content

Specify Sync and Send #205

Specify Sync and Send

Specify Sync and Send #205

Workflow file for this run

name: check
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
RUST_TOOLCHAIN: '1.81'
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: '${{ env.RUST_TOOLCHAIN }}'
components: 'clippy'
# Compile, but don't run.
- run: cargo test --no-run
- run: cargo test --all-features
- name: Test xrcf-bin output
run: |
HELP_OUTPUT=$(cargo run --bin xrcf-bin -- --help)
echo "$HELP_OUTPUT"
if ! echo "$HELP_OUTPUT" | grep -q "Usage: xrcf-bin"; then
echo
echo "Unexpected help output"
exit 1
fi
- name: Test xrcf docs build
run: |
cd xrcf/
# Deny warnings.
RUSTDOCFLAGS="-D warnings" cargo doc
- run: cargo clippy -- -Dwarnings
typos:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
with:
files: '.'
fmt:
runs-on: ubuntu-22.04
timeout-minutes: 10
if: github.ref != 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: '${{ env.RUST_TOOLCHAIN }}'
# Do not use the default GitHub Action.
# It took both Forgejo and the runner down (100% CPU).
- run: rustup component add rustfmt
- run: cargo fmt --all --check