mirror of
https://github.com/clowzed/sero
synced 2026-03-14 12:45:50 +01:00
* readme-fix: remove warning about cli tool. Update version in docker-compose.yml to match. * Updated readme.md. Fully remove openapi.json. Remove version cmp beteen Cargo.toml and openapi.json. Added openapi.josn to gitignore.
90 lines
1.8 KiB
YAML
90 lines
1.8 KiB
YAML
name: "Test"
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- "**" # matches every branch
|
|
|
|
jobs:
|
|
check:
|
|
name: "Run cargo check"
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- name: "Check out the repo"
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: "actions-rs/toolchain@v1"
|
|
with:
|
|
profile: "minimal"
|
|
toolchain: "stable"
|
|
override: true
|
|
|
|
- uses: "actions-rs/cargo@v1"
|
|
with:
|
|
command: "check"
|
|
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_DB: postgres
|
|
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 5432:5432
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Run tests (with database service)
|
|
run: cargo test --verbose -- --test-threads=1
|
|
|
|
fmt:
|
|
name: "Run cargo fmt"
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- name: "Check out the repo"
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: "actions-rs/toolchain@v1"
|
|
with:
|
|
profile: "minimal"
|
|
toolchain: "nightly"
|
|
override: true
|
|
|
|
- run: "rustup component add rustfmt"
|
|
|
|
- uses: "actions-rs/cargo@v1"
|
|
with:
|
|
command: "fmt"
|
|
args: "--all -- --check"
|
|
|
|
clippy:
|
|
name: "Run cargo clippy"
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- name: "Check out the repo"
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: "actions-rs/toolchain@v1"
|
|
with:
|
|
profile: "minimal"
|
|
toolchain: "stable"
|
|
override: true
|
|
|
|
- run: "rustup component add clippy"
|
|
|
|
- uses: "actions-rs/cargo@v1"
|
|
with:
|
|
command: "clippy"
|
|
args: "-- -D warnings"
|