From e7b3558813385a1151b74540c0fbc84de285bc06 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 17 Jan 2021 23:42:25 +0100 Subject: [PATCH] Added github actions and makefile --- .github/workflows/clippy.yml | 13 +++++++++++++ .github/workflows/rustfmt.yml | 13 +++++++++++++ .github/workflows/tests.yml | 13 +++++++++++++ Makefile | 24 ++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 .github/workflows/clippy.yml create mode 100644 .github/workflows/rustfmt.yml create mode 100644 .github/workflows/tests.yml create mode 100644 Makefile 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