Skip to content

feat: Constraints API v0 #87

feat: Constraints API v0

feat: Constraints API v0 #87

Workflow file for this run

name: Unit Tests
on:
push:
branches: [main, develop, "release/**"]
pull_request:
branches: [main, develop, "release/**"]
env:
CARGO_TERM_COLOR: always
jobs:
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: timescale/timescaledb-ha:pg16
env:
POSTGRES_PASSWORD: password
ports:
- 5433:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:latest
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
path: ./repos/${{ secrets.REPO_NAME }}
ref: ${{ github.ref }}
# Install Protocol Buffers Compiler
- name: Install Protobuf Compiler (protoc)
run: sudo apt-get install -y protobuf-compiler
- name: Change to project directory
run: cd ./repos/${{ secrets.REPO_NAME }}
# Set up the nightly Rust toolchain
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-06-01
override: true
components: rustfmt, clippy
# Run unit tests
- name: Run unit tests
env:
DATABASE_URL: "postgres://postgres:password@localhost:5433/postgres"
run: cargo test --workspace --all-features
working-directory: ./repos/${{ secrets.REPO_NAME }}