Added editorconfig file
continuous-integration/drone the build was successful Details

pull/8/head
Jef Roosens 2021-06-25 12:07:33 +02:00
parent fa5ee06a04
commit 89bc9b91e1
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
3 changed files with 72 additions and 63 deletions

9
.editorconfig 100644
View File

@ -0,0 +1,9 @@
root = true
[*]
end_of_line = lf
insert_final_newline = false
indent_size = 4
[*.{yml,yaml}]
indent_size = 2

2
.gitignore vendored
View File

@ -6,7 +6,7 @@ target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk

View File

@ -1,77 +1,77 @@
pipeline:
# Download the cache from S3
restore-cache:
image: plugins/s3-cache
pull: true
# Download the cache from S3
restore-cache:
image: plugins/s3-cache
pull: true
endpoint: https://s3.roosens.me
root: build-cache/
restore: true
endpoint: https://s3.roosens.me
root: build-cache/
restore: true
secrets: [ cache_s3_access_key, cache_s3_secret_key ]
secrets: [ cache_s3_access_key, cache_s3_secret_key ]
# =====BUILDING=====
build-backend:
image: rust:1.53-alpine
pull: true
group: build
environment:
- CARGO_HOME=.cargo
commands:
- apk add musl-dev postgresql-dev
- cargo build
# =====BUILDING=====
build-backend:
image: rust:1.53-alpine
pull: true
group: build
environment:
- CARGO_HOME=.cargo
commands:
- apk add musl-dev postgresql-dev
- cargo build
# =====TESTING=====
test-backend:
image: rust:1.53-alpine
environment:
- CARGO_HOME=.cargo
commands:
- apk add musl-dev postgresql-dev
- cargo test
# =====TESTING=====
test-backend:
image: rust:1.53-alpine
environment:
- CARGO_HOME=.cargo
commands:
- apk add musl-dev postgresql-dev
- cargo test
# =====LINTING=====
lint-backend:
image: rust:1.53-alpine
group: lint
environment:
- CARGO_HOME=.cargo
commands:
- apk add musl-dev postgresql-dev
- rustup component add rustfmt clippy
- cargo fmt -- --check
# This is run here because it requires compilation
- cargo clippy --all-targets -- -D warnings
# =====LINTING=====
lint-backend:
image: rust:1.53-alpine
group: lint
environment:
- CARGO_HOME=.cargo
commands:
- apk add musl-dev postgresql-dev
- rustup component add rustfmt clippy
- cargo fmt -- --check
# This is run here because it requires compilation
- cargo clippy --all-targets -- -D warnings
# =====REBUILD & FLUSH CACHE=====
rebuild-cache:
image: plugins/s3-cache
# =====REBUILD & FLUSH CACHE=====
rebuild-cache:
image: plugins/s3-cache
endpoint: https://s3.roosens.me
root: build-cache/
rebuild: true
mount:
- target
- .cargo
endpoint: https://s3.roosens.me
root: build-cache/
rebuild: true
mount:
- target
- .cargo
secrets: [ cache_s3_access_key, cache_s3_secret_key ]
# Push the cache, even on failure
when:
status: [ success, failure ]
secrets: [ cache_s3_access_key, cache_s3_secret_key ]
# Push the cache, even on failure
when:
status: [ success, failure ]
flush-cache:
image: plugins/s3-cache
flush-cache:
image: plugins/s3-cache
endpoint: https://s3.roosens.me
root: build-cache/
flush: true
flush_age: 14
endpoint: https://s3.roosens.me
root: build-cache/
flush: true
flush_age: 14
secrets: [ cache_s3_access_key, cache_s3_secret_key ]
# Push the cache, even on failure
when:
status: [ success, failure ]
secrets: [ cache_s3_access_key, cache_s3_secret_key ]
# Push the cache, even on failure
when:
status: [ success, failure ]