Skip to content

Add github actions

Add github actions #1

name: Check and Lint
on:
push:
pull_request:
branches:
- main
jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v2
# Setup Rust
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
# Cargo check
- name: Run cargo check
run: cargo check --all-targets
clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- run: rustup component add clippy
- run: cargo clippy --all-targets -- -D warnings