-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run0: Add github action for building and unit testing
Using @MarcoPolo action-rs cargo fork until hopefully actions-rs/cargo#59 gets merged. Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
- Loading branch information
Samuel Ortiz
committed
Jan 16, 2022
1 parent
0836ac5
commit 2ff4a28
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: run0 build and unit tests | ||
on: [push, pull_request, create] | ||
|
||
jobs: | ||
basic_ci: | ||
if: github.event_name == 'pull_request' | ||
name: Check | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./run0 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- name: Code checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install Rust toolchain (${{ matrix.rust }}) | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Build and install with default features | ||
run: cargo build | ||
|
||
- name: Run cargo test | ||
uses: marcopolo/cargo@master | ||
with: | ||
working-directory: ./run0 | ||
command: test | ||
|
||
- name: Run cargo fmt check | ||
uses: marcopolo/cargo@master | ||
with: | ||
working-directory: ./run0 | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Run rust lint check | ||
uses: marcopolo/cargo@master | ||
with: | ||
working-directory: ./run0 | ||
command: clippy | ||
args: --all-targets --all-features -- -D warnings |