From ffd893f7c88769dfcb889861cf662b18f896a55f Mon Sep 17 00:00:00 2001 From: Cody Date: Sat, 4 Mar 2023 13:52:23 -0600 Subject: Add GitHub workflow and update Nix flakes --- .github/CODEOWNERS | 1 + .github/workflows/linting.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/testing.yml | 22 ++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/testing.yml (limited to '.github') diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..69085a7 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @CatDevz @nic-gaffney \ No newline at end of file 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 -- cgit v1.2.3