diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml new file mode 100644 index 0000000..b5839c5 --- /dev/null +++ b/.github/workflows/rust.yaml @@ -0,0 +1,59 @@ +on: push +name: Rust CI +jobs: + check: + name: check + runs-on: ubuntu-latest + steps: + - name: checkout sources + uses: actions/checkout@v2 + - name: install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: check for errors + uses: actions-rs/cargo@v1 + with: + command: check + args: --locked + env: + RUST_BACKTRACE: 1 + test: + name: test + runs-on: ubuntu-latest + steps: + - name: checkout sources + uses: actions/checkout@v2 + - name: install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --locked + env: + RUST_BACKTRACE: 1 + clippy: + name: clippy + runs-on: ubuntu-latest + steps: + - name: checkout sources + uses: actions/checkout@v2 + - name: install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: clippy + override: true + - name: run linter + uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings