Skip to content

Do not allow to save links with an empty title #233

Do not allow to save links with an empty title

Do not allow to save links with an empty title #233

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"
jobs:
build-lint:
name: Build & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup rust cache
uses: Swatinem/rust-cache@v2
- run: cargo build --release
env:
SQLX_OFFLINE: true
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
- name: podman login
run: podman login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
- name: podman build linux/amd64
run: podman build --format docker --platform linux/amd64 --manifest linkblocks -f Containerfile target/release
- name: podman manifest push latest
run: podman manifest push linkblocks ghcr.io/raffomania/linkblocks:latest
if: github.ref == 'refs/heads/main'
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup rust cache
uses: Swatinem/rust-cache@v2
- name: cargo test
run: cargo test
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432
SQLX_OFFLINE: true