Skip to content

Add some basic github actions #1

Add some basic github actions

Add some basic github actions #1

Workflow file for this run

name: Tests
on:
push:
branches: ["**"]
pull_request:
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nostr
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres -d nostr"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/nostr
RUST_BACKTRACE: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run workspace tests
run: cargo test --workspace --all-targets