Skip to content

Commit

Permalink
run0: Add github action for building and unit testing
Browse files Browse the repository at this point in the history
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.
54 changes: 54 additions & 0 deletions .github/workflows/run0.yaml
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

0 comments on commit 2ff4a28

Please sign in to comment.