Added github actions and makefile

This commit is contained in:
Armin Ronacher 2021-01-17 23:42:25 +01:00
parent 501ca2fd5f
commit e7b3558813
4 changed files with 63 additions and 0 deletions

13
.github/workflows/clippy.yml vendored Normal file
View file

@ -0,0 +1,13 @@
name: Clippy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run clippy
run: make lint

13
.github/workflows/rustfmt.yml vendored Normal file
View file

@ -0,0 +1,13 @@
name: Rustfmt
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run rustfmt
run: make format-check

13
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,13 @@
name: Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Test
run: make test

24
Makefile Normal file
View file

@ -0,0 +1,24 @@
all: test
build:
@cargo build --all-features
doc:
@cargo doc --all-features
test:
@cargo test --all-features
format:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all
format-check:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all -- --check
lint:
@rustup component add clippy 2> /dev/null
@cargo clippy
.PHONY: all doc test format format-check lint