BREAKING: Make non-internal associated functions into methods #470
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: Rust | |
on: | |
push: | |
branches: ['main', 'develop'] | |
pull_request: | |
branches: ['main', 'develop'] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.74 | |
components: rustfmt | |
- name: Check formatting | |
run: > | |
echo "::echo::on"; | |
cargo fmt -- --check; | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.74 | |
components: clippy | |
- name: Run linter | |
run: cargo clippy -- -D warnings | |
test: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.74 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: nextest | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run unit and integration tests | |
run: cargo nextest run --workspace --exclude workspaces-tests | |
- name: Run doctests | |
run: cargo test --doc | |
workspaces-test: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.74 | |
targets: wasm32-unknown-unknown | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-make,nextest | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run workspaces tests | |
run: cd workspaces-tests && cargo make nextest |