diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6103d9f..71e0913 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,21 +2,32 @@ name: Rust on: push: - branches: [ "master" ] + branches: [ "main" ] pull_request: - branches: [ "master" ] + branches: [ "main" ] env: CARGO_TERM_COLOR: always -jobs: - build-and-test: +name: build +jobs: + check: + name: Rust project runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose -Z sparse-registry - - name: Run tests - run: cargo test --verbose -Z sparse-registry + - uses: actions/checkout@v2 + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rustfmt, clippy + + # `cargo check` command here will use installed `nightly` + # as it is set as an "override" for current directory + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check --verbose -Z sparse-registry