name: Build
on:
push:
branches:
- "master"
- "develop"
tags:
- "*"
schedule:
- cron: "40 4 * * *" pull_request:
jobs:
test:
name: "Test"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: "Checkout Repository"
uses: actions/checkout@v1
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
if: runner.os == 'macOS'
- name: "Print Rust Version"
run: |
rustc -Vv
cargo -Vv
- name: "Run cargo build"
run: cargo build
- name: "Run cargo test"
run: cargo test
check_formatting:
name: "Check Formatting"
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v1
- run: rustup toolchain install nightly --profile minimal --component rustfmt
- run: cargo +nightly fmt -- --check
clippy:
name: "Clippy"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v1
- run: rustup toolchain install nightly --profile minimal --component clippy
- run: cargo +nightly clippy -- -D warnings