registry/.circleci/config.yml

61 lines
1.6 KiB
YAML

version: 2.1
orbs:
docker: circleci/docker@1.5.0
jobs:
Build and test Rust service:
docker:
- image: circleci/rust:latest
resource_class: xlarge
environment:
RUST_BACKTRACE: full
steps:
- checkout
- run: |
sudo bash .github/download_marine.sh
- restore_cache:
keys:
- registry05-{{ checksum "service/Cargo.lock" }}
- run: |
cd ./service
rustup toolchain install nightly-2022-01-16-x86_64-unknown-linux-gnu
rustup default nightly-2022-01-16-x86_64-unknown-linux-gnu
rustup override set nightly-2022-01-16-x86_64-unknown-linux-gnu
rustup target add wasm32-wasi --toolchain nightly-2022-01-16-x86_64-unknown-linux-gnu
- run: ./service/build.sh
- run: |
cd ./service
cargo test --no-fail-fast --release --all-features -- --test-threads=1
- save_cache:
paths:
- ~/.cargo
- ~/.rustup
key: registry05-{{ checksum "service/Cargo.lock" }}
Test example:
docker:
- image: cimg/node:16.15
steps:
- checkout
- restore_cache:
keys:
- registry00-{{ checksum "example/package-lock.json" }}
- run: |
cd example
npm i
- run: |
cd example
npm run start
- save_cache:
paths:
- ~/example/node-modules
key: registry00-{{ checksum "example/package-lock.json" }}
workflows:
version: 2
CircleCI:
jobs:
- Build and test Rust service
- Test example