chore: Add CI

This commit is contained in:
Dmitry Dygalo 2020-04-15 21:05:06 +02:00 committed by Dmitry Dygalo
parent 1157cc1e63
commit 3355dc32a1
1 changed files with 60 additions and 0 deletions

60
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Continuous integration
on: [pull_request]
jobs:
commitsar:
name: Verify commit messages
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Run commitsar
uses: docker://commitsar/commitsar
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings