common-rs/.woodpecker/.test.yml

57 lines
1.6 KiB
YAML
Raw Normal View History

2022-01-03 12:46:29 +01:00
# When block for each step is temporary until top-level when is properly implemented
pipeline:
2022-01-03 17:21:56 +01:00
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 .
2022-01-03 17:23:59 +01:00
- chmod +x sccache
2022-01-03 17:21:56 +01:00
2022-01-03 12:46:29 +01:00
clippy:
image: 'rust:1.57'
2022-01-03 17:21:56 +01:00
environment:
- SCCACHE_BUCKET=rbci
2022-01-03 17:42:29 +01:00
- SCCACHE_ENDPOINT=s3.rustybever.be
2022-01-03 17:21:56 +01:00
- SCCACHE_S3_USE_SSL=true
2022-01-03 18:20:07 +01:00
- CARGO_INCREMENTAL=false
2022-01-03 12:46:29 +01:00
commands:
2022-01-03 17:23:19 +01:00
- rustup component add clippy
2022-01-03 17:21:56 +01:00
- export RUSTC_WRAPPER="$PWD"/sccache
- export SCCACHE_S3_KEY_PREFIX=$CI_REPO_NAME
2022-01-05 10:13:10 +01:00
- export CARGO_HOME="$PWD/cargo"
2022-01-03 12:46:29 +01:00
- cargo clippy -- -D clippy::all --no-deps
2022-01-03 18:06:35 +01:00
- ./sccache --show-stats
2022-01-03 17:21:56 +01:00
secrets:
- aws_access_key_id
- aws_secret_access_key
2022-01-03 12:46:29 +01:00
when:
2022-01-05 10:23:04 +01:00
event: pull_request
2022-01-03 12:46:29 +01:00
2022-01-05 10:06:46 +01:00
# tests:
# image: 'rust:1.57'
# commands:
# - export RUSTC_WRAPPER="$PWD"/sccache
# - cargo test
# when:
# event: pull_request
2022-01-03 12:46:29 +01:00
tests:
image: 'rust:1.57'
2022-01-05 10:06:46 +01:00
environment:
- SCCACHE_BUCKET=rbci
- SCCACHE_ENDPOINT=s3.rustybever.be
- SCCACHE_S3_USE_SSL=true
- CARGO_INCREMENTAL=false
2022-01-03 12:46:29 +01:00
commands:
2022-01-05 10:06:46 +01:00
- rustup component add clippy
2022-01-03 17:21:56 +01:00
- export RUSTC_WRAPPER="$PWD"/sccache
2022-01-05 10:06:46 +01:00
- export SCCACHE_S3_KEY_PREFIX=$CI_REPO_NAME
2022-01-05 10:13:10 +01:00
- export CARGO_HOME="$PWD/cargo"
2022-01-03 12:46:29 +01:00
- cargo test
2022-01-05 10:06:46 +01:00
- ./sccache --show-stats
secrets:
- aws_access_key_id
- aws_secret_access_key
2022-01-03 12:46:29 +01:00
when:
2022-01-05 10:06:46 +01:00
event: push