common-rs/.woodpecker/.test.yml

57 lines
1.6 KiB
YAML

# When block for each step is temporary until top-level when is properly implemented
pipeline:
add-sccache:
image: 'rust:1.57'
commands:
- curl https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz -Lo - | tar xzf -
- mv sccache-v0.2.15-x86_64-unknown-linux-musl/sccache .
- chmod +x sccache
clippy:
image: 'rust:1.57'
environment:
- SCCACHE_BUCKET=rbci
- SCCACHE_ENDPOINT=s3.rustybever.be
- SCCACHE_S3_USE_SSL=true
- CARGO_INCREMENTAL=false
commands:
- rustup component add clippy
- export RUSTC_WRAPPER="$PWD"/sccache
- export SCCACHE_S3_KEY_PREFIX=$CI_REPO_NAME
- export CARGO_HOME="$PWD/cargo"
- cargo clippy -- -D clippy::all --no-deps
- ./sccache --show-stats
secrets:
- aws_access_key_id
- aws_secret_access_key
when:
event: pull_request
# tests:
# image: 'rust:1.57'
# commands:
# - export RUSTC_WRAPPER="$PWD"/sccache
# - cargo test
# when:
# event: pull_request
tests:
image: 'rust:1.57'
environment:
- SCCACHE_BUCKET=rbci
- SCCACHE_ENDPOINT=s3.rustybever.be
- SCCACHE_S3_USE_SSL=true
- CARGO_INCREMENTAL=false
commands:
- rustup component add clippy
- export RUSTC_WRAPPER="$PWD"/sccache
- export SCCACHE_S3_KEY_PREFIX=$CI_REPO_NAME
- export CARGO_HOME="$PWD/cargo"
- cargo test
- ./sccache --show-stats
secrets:
- aws_access_key_id
- aws_secret_access_key
when:
event: push