release: 🏷️ Version 0.1.1 #9
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
name: Cargo Build & Test | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
name: Rust project - latest | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- beta | |
#- nightly | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- name: Install the test dependencies | |
run: sudo apt-get update && sudo apt-get install -y rrdcached socat | |
- name: Run the rrdcached server | |
run: | | |
sudo mkdir -p /tmp/rrdcached/db /tmp/rrdcached/journal && | |
sudo chown -R $USER /tmp/rrdcached && | |
rrdcached -B -R -t 2 -b /tmp/rrdcached/db -j /tmp/rrdcached/journal -l :42217 -p /tmp/rrdcached.pid && | |
socat UNIX-LISTEN:./rrdcached.sock,reuseaddr,fork TCP:localhost:42217 & | |
- name: Test the project | |
run: cargo test --verbose |