aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/linting.yml33
-rw-r--r--.github/workflows/testing.yml22
2 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
new file mode 100644
index 0000000..685b93a
--- /dev/null
+++ b/.github/workflows/linting.yml
@@ -0,0 +1,33 @@
+name: Linting
+on: [push, pull_request]
+
+jobs:
+ dependency-lint:
+ name: Dependency linting
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: EmbarkStudios/cargo-deny-action@v1
+ with:
+ arguments: --all-features
+ command-arguments: --allow license-not-encountered
+ code-lint:
+ name: Code linting
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: nightly
+ components: clippy, rust-src
+ - run: cargo clippy --all-features -- --deny warnings
+ code-format:
+ name: Check formatting
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: nightly
+ components: rustfmt, rust-src
+ - run: cargo fmt -- --check
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
new file mode 100644
index 0000000..f2616d9
--- /dev/null
+++ b/.github/workflows/testing.yml
@@ -0,0 +1,22 @@
+name: Testing
+on: [push, pull_request]
+
+jobs:
+ test:
+ strategy:
+ matrix:
+ os:
+ - ubuntu
+ - windows
+ - macos
+ rust:
+ - nightly
+ - stable
+ name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: ${{ matrix.rust }}
+ - run: cargo test --all-features