Skip to content

feat: Subscription Service for Auto-Swap #20

feat: Subscription Service for Auto-Swap

feat: Subscription Service for Auto-Swap #20

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
paths-ignore:
- "README.md"
- Dockerfile
pull_request:
branches: ["main"]
paths-ignore:
- "README.md"
- Dockerfile
env:
CARGO_TERM_COLOR: always
DATABASE_URL: postgres://postgres:password@localhost:5432/autoswappr
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: autoswappr
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt -- --check
- name: Lint with clippy
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test --verbose
env:
PORT: 8080
APP_ENVIRONMENT: development
DATABASE_POOL_MAX_SIZE: 50
DATABASE_NAME: autoswappr
- name: Build
run: cargo build --release
if: github.ref == 'refs/heads/main'