Skip to content

Commit

Permalink
Evolve to next generation webapp (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
saschagrunert committed Jul 30, 2018
1 parent 580ae33 commit 04458d0
Show file tree
Hide file tree
Showing 79 changed files with 4,410 additions and 1,714 deletions.
112 changes: 112 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,112 @@
---
version: 2
defaults: &defaults
docker:
- image: saschagrunert/build-rust:latest
workflows:
version: 2
pipeline:
jobs:
- build
- doc
- rustfmt
- clippy
- test
jobs:
build:
<<: *defaults
steps:
- checkout
- run:
name: Version information
command: |
rustc --version
rustup --version
cargo --version
- restore_cache:
keys:
- build-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Build all targets
command: make build-backend build-frontend
- save_cache:
paths:
- /root/.cargo/registry
- target
key: build-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
doc:
<<: *defaults
steps:
- add_ssh_keys:
fingerprints:
- c2:05:c6:97:5c:9d:17:b7:c8:84:fa:6d:05:55:75:8a
- checkout
- run:
name: Setup git
command: |
git config --global user.email mail@saschagrunert.de
git config --global user.name "CircleCI"
- restore_cache:
keys:
- doc-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Build documentation
command: make build-doc
- save_cache:
paths:
- /root/.cargo/registry
- target
key: doc-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Deploy documentation
command: |
git fetch origin gh-pages
git checkout gh-pages
rm -rf doc
mv target/doc .
git add .
git diff-index --quiet HEAD || git commit -m 'Update documentation'
git push origin gh-pages
rustfmt:
<<: *defaults
steps:
- checkout
- run:
name: Rust Format
command: make lint-rustfmt
clippy:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- clippy-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Clippy
command: make lint-clippy
- save_cache:
paths:
- /root/.cargo/registry
- target
key: clippy-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
test:
docker:
- image: saschagrunert/build-rust:latest
- image: circleci/postgres:10.4-alpine
environment:
POSTGRES_USER: username
POSTGRES_DB: database
steps:
- checkout
- run:
name: Prepare database
command: |
sleep 10
diesel migration run \
--database-url postgres://username:@localhost/database
- run:
name: Run tests
command: make coverage
- run:
name: Upload coverage report
command: bash <(curl -s https://codecov.io/bash)
8 changes: 0 additions & 8 deletions .github/tech_stack.mdd

This file was deleted.

Binary file removed .github/tech_stack.png
Binary file not shown.
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,4 +1,4 @@
/target/
Cargo.lock
target/
.*/target/
**/*.rs.bk
*.tar
13 changes: 13 additions & 0 deletions .rustfmt.toml
@@ -0,0 +1,13 @@
condense_wildcard_suffixes = true
format_strings = true
max_width = 120
merge_imports = true
newline_style = "Unix"
normalize_comments = true
reorder_impl_items = true
report_fixme = "Always"
report_todo = "Always"
unstable_features = true
use_field_init_shorthand = true
use_try_shorthand = true
wrap_comments = true
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

0 comments on commit 04458d0

Please sign in to comment.