lighthouse/.gitlab-ci.yml

42 lines
837 B
YAML

#Adapted from https://users.rust-lang.org/t/my-gitlab-config-docs-tests/16396
image: 'sigp/lighthouse:latest'
stages:
- test
- doc
variables:
CARGO_HOME: /cache/cargocache
check-fmt:
stage: test
script:
- cargo build --manifest-path protos/Cargo.toml
- cargo fmt --all -- --check
test-dev:
stage: test
script:
- cargo test --verbose --all
test-release:
stage: test
script:
- cargo test --verbose --all --release
pages:
stage: doc
script:
- cargo doc --no-deps
- aws s3 sync target/doc/ s3://lighthouse-docs.sigmaprime.io/
# Configure the below when we want to have a default page (and update S3 bucket index).
# - echo '<meta http-equiv="refresh" content="0; url={{ LIBRARY NAME }}">' > public/index.html
only:
- master
- gitlab-docs
cache:
paths:
- target/