Archived
1
0
Fork 0

ci: configure github actions

This commit is contained in:
Dmitriy Pleshevskiy 2021-02-21 17:15:09 +03:00
parent 7a6f39d195
commit 4ed8861279

52
.github/workflows/rust.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.50.0 # MSRV
steps:
- uses: actions/checkout@v2
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Check format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Check clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- uses: isbang/compose-action@v0.1
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: -- --test-threads=1