Files
handmade-revolt-backend/.github/workflows/rust.yaml
2021-09-06 16:40:30 +02:00

42 lines
915 B
YAML

name: Rust build and test
on:
push:
branches: [ unit-tests ]
pull_request:
branches: [ unit-tests ]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Rust project
runs-on: ubuntu-latest
steps:
- 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 build
uses: actions-rs/cargo@v1
with:
command: build
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: Run cargo build --release
uses: actions-rs/cargo@v1
with:
command: build --release