diff --git a/build-res/atuin-run-tests.sh b/build-res/atuin-run-tests.sh new file mode 100755 index 0000000..f464f9b --- /dev/null +++ b/build-res/atuin-run-tests.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# this helper script is needed because it seems like it's not possible +# to run a background process in the .spec file directly + +set -e + +source ~/.cargo/env + +# PostgresQL is needed for some tests +PGDATA="$HOME/.local/share/pgsql/data" +mkdir -p "$PGDATA" +postgres -D "$PGDATA" &> postgres.log & +ss -tupln + +cargo test --workspace +cat postgres.log diff --git a/specs/atuin.spec b/specs/atuin.spec index c3d0a9b..f7b20dd 100644 --- a/specs/atuin.spec +++ b/specs/atuin.spec @@ -1,15 +1,16 @@ %global debug_package %{nil} Name: atuin -Version: 16.0.0 +Version: 17.0.0 Release: 1%{?dist} Summary: Magical shell history License: MIT URL: https://github.com/ellie/atuin Source0: %{url}/archive/v%{version}.tar.gz +Source1: build-res/atuin-run-tests.sh -BuildRequires: gcc +BuildRequires: gcc iproute postgresql-server %description Atuin replaces your existing shell history with a SQLite database, and @@ -24,18 +25,20 @@ machines, via an Atuin server. curl -Lf "https://sh.rustup.rs" | sh -s -- --profile minimal -y %build -source ~/.cargo/env -RUSTFLAGS="-C strip=symbols" cargo build --release - -for SHELL in "bash" "fish" "zsh"; do - target/release/%{name} gen-completions --shell $SHELL -o . -done +ls -l +./atuin-run-tests.sh %check source ~/.cargo/env -# skip postgres test -cargo test --workspace -- \ - --skip registration + +# PostgresQL is needed for some tests +PGDATA="$HOME/.local/share/pgsql/data" +mkdir -p "$PGDATA" +postgres -D "$PGDATA" &> postgres.log & +ss -tupln + +cargo test --workspace +cat postgres.log %install # bin @@ -55,6 +58,10 @@ install -Dpm 644 _%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name} %{_datadir}/zsh/site-functions/_%{name} %changelog +* Thu Oct 26 2023 cyqsimon - 17.0.0-1 +- Release 17.0.0 +- Re-enable postgresql tests + * Tue Aug 08 2023 cyqsimon - 16.0.0-1 - Relaese 16.0.0