Build and Test #1109
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: Build and Test | |
on: | |
push: | |
schedule: | |
- cron: 0 0 * * * | |
jobs: | |
check: | |
name: Check the code | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable, beta] | |
steps: | |
- name: Install the appropriate Rust toolchain | |
run: | | |
rustup toolchain install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Run rustfmt | |
run: | | |
rustup component add rustfmt | |
cargo fmt --all -- --check | |
- name: Run clippy | |
run: | | |
rustup component add clippy | |
cargo clippy --workspace --all-features --all-targets | |
test: | |
name: Test the code | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable, beta] | |
steps: | |
- name: Install the appropriate Rust toolchain | |
run: | | |
rustup toolchain install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Run cargo test | |
run: | | |
cargo test --workspace --all-features --all-targets --no-fail-fast | |
- name: Ensure index.d.ts is up-to-date after tests were run | |
run: | | |
git diff --exit-code -- types/bindings/index.d.ts |