diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..547ca71 --- /dev/null +++ b/.github/workflows/clippy.yml @@ -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 diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml new file mode 100644 index 0000000..f075cf1 --- /dev/null +++ b/.github/workflows/rustfmt.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..38bf178 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,13 @@ +name: Tests + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Test + run: make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7bc49a5 --- /dev/null +++ b/Makefile @@ -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