From 102e166b040030b590df83888a1d1a47d0130f10 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:21 +0100 Subject: chore(ci): add github workflow --- .github/workflows/lint.yml | 24 ++++++++++++++++++++++++ .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml (limited to '.github/workflows') diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..85c8a17 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +on: [push, pull_request] + +name: rustfmt and clippy + +jobs: + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt, clippy + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c492721 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +on: [push, pull_request] + +name: check and test + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: Test Suite + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: nightly + - uses: actions-rs/cargo@v1 + with: + command: test \ No newline at end of file -- cgit v1.2.3