POM: change storage location; pull docker image #112
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
name: Check | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
mq: [rabbitmq, redis] | |
include: | |
- mq: rabbitmq | |
docker_image: "rabbitmq:3.8-management" | |
mq_uri: "amqp://guest:guest@localhost" | |
mq_api: "http://guest:guest@localhost:15672/api" | |
- mq: redis | |
docker_image: "redis" | |
mq_uri: "redis://localhost" | |
services: | |
mq: | |
image: ${{ matrix.docker_image }} | |
ports: | |
- 5672:5672 # rabbitmq | |
- 15672:15672 # rabbitmq | |
- 6379:6379 # redis | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Rust | |
run: | | |
rustup component add rustfmt | |
rustup component add clippy | |
- name: Install protobuf | |
run: sudo apt update && sudo apt install protobuf-compiler -y | |
- name: Check | |
run: cargo check --release --locked | |
- name: Build | |
run: cargo build --all-targets --locked | |
- name: Format check | |
run: cargo fmt --all -- --check | |
- name: Clippy test | |
run: cargo clippy --profile test -- -D warnings -D clippy::dbg_macro | |
- name: Run tests | |
env: | |
COLINK_SERVER_MQ_URI: ${{ matrix.mq_uri }} | |
COLINK_SERVER_MQ_API: ${{ matrix.mq_api }} | |
run: cargo test |