archive
/
md-pdf-rs
Archived
1
Fork 0

Merge pull request #3 from hoily/circleci2

Circleci2
This commit is contained in:
Jake Howard 2017-08-15 23:47:11 +01:00 committed by GitHub
commit c36f3987d1
4 changed files with 27 additions and 22 deletions

25
.circleci/config.yml Normal file
View File

@ -0,0 +1,25 @@
version: 2.0
jobs:
build:
docker:
- image: jimmycuadra/rust
working_directory: ~/md-pdf
steps:
- checkout
- restore_cache:
keys:
- cargo-{{ checksum "Cargo.lock" }}
- run: which rustfmt || cargo install rustfmt
- run: apt update && apt install -y wget
- run: ./scripts/install-deps.sh
- run: cargo fmt -- --write-mode=diff
- run: cargo build
- run: cargo build --release
- save_cache:
key: cargo-{{ checksum "Cargo.lock" }}
paths:
- ~/.cargo
- target/
- run: cargo test
- run: cargo test --release

View File

@ -1,18 +0,0 @@
language: rust
rust:
- stable
cache: cargo
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
- which rustfmt || cargo install rustfmt
script:
- ./scripts/install-deps.sh
- cargo fmt -- --write-mode=diff
- cargo build
- cargo build --release
- cargo test
- cargo test --release
- cd test-files && cargo run --release -- build && cd -
- cd test-files && cargo run -- build && cd -

View File

@ -1,5 +1,5 @@
# md-pdf
[![Travis](https://img.shields.io/travis/hoily/md-pdf.svg?style=flat-square)](https://travis-ci.org/hoily/md-pdf)
[![CircleCI](https://img.shields.io/circleci/project/github/hoily/md-pdf.svg?style=flat-square)](https://circleci.com/gh/hoily/md-pdf)
Convert markdown files into PDF Documents.

View File

@ -7,9 +7,7 @@ fn stub(config: Config, input: String) -> Result<String, String> {
pub fn render(config: Config, input: String) -> Result<String, String> {
let mut rendered_input = input;
for renderer in vec![
stub
] {
for renderer in vec![stub] {
rendered_input = try!(renderer(config.clone(), rendered_input));
}
return Ok(rendered_input);