add CI
This commit is contained in:
18
.drone.yml
Normal file
18
.drone.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: pre-commit
|
||||||
|
image: iamthefij/drone-pre-commit:latest
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install -y cmake
|
||||||
|
- curl https://sh.rustup.rs -sSf | bash -s -- -y
|
||||||
|
- export PATH="/root/.cargo/bin:$${PATH}"
|
||||||
|
- pre-commit run --all-files
|
||||||
|
- name: test
|
||||||
|
image: rust:latest
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install -y cmake
|
||||||
|
- cargo build --verbose --all
|
||||||
|
- cargo test --verbose --all
|
||||||
13
.pre-commit-config.yaml
Normal file
13
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.3.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- repo: https://github.com/doublify/pre-commit-rust
|
||||||
|
rev: v1.0
|
||||||
|
hooks:
|
||||||
|
- id: fmt
|
||||||
|
- id: cargo-check
|
||||||
Reference in New Issue
Block a user