before_script:
- rustc --version && cargo --version

image: rust:1.45

test:
  script:
  - &test cargo test --all-features --verbose

clippy:
  script:
  - rustup component add clippy
  - cargo clippy --verbose

rustfmt:
  script:
  - rustup component add rustfmt
  - cargo fmt -- --check

pages:
  stage: deploy
  script:
  - cargo doc --all-features
  - mv target/doc public
  - echo /showdown /showdown/showdown 301 > public/_redirects
  artifacts:
    paths:
    - public
  only:
  - master
