Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gillett-hernandez committed Dec 2, 2023
1 parent 3eb089f commit 0c66425
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0c66425

Please sign in to comment.