diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..f431735 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,28 @@ +on: [push, pull_request] +name: Lint and Test +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set Toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Check Format + run: cargo fmt --all -- --check + - name: Run Clippy + run: cargo clippy -- -D warnings + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set Toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Run tests + run: cargo test diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml new file mode 100644 index 0000000..2b841cd --- /dev/null +++ b/.github/workflows/lint-and-test.yml @@ -0,0 +1,28 @@ +on: [push, pull_request] +name: Lint and Test +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@4 + - name: Set Toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Check Format + run: cargo fmt --all -- --check + - name: Run Clippy + run: cargo clippy -- -D warnings + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@4 + - name: Set Toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Run tests + run: cargo test