apply treefmt
parent
cc78160e6e
commit
16ab6ae069
@ -1,22 +1,23 @@
|
||||
{
|
||||
writeShellScript,
|
||||
python3,
|
||||
pkgs,
|
||||
lib,
|
||||
coreutils,
|
||||
}: let
|
||||
systemd-vaultd = pkgs.callPackage ../../default.nix {};
|
||||
systemd = pkgs.callPackage ../pkgs/systemd.nix {};
|
||||
{ writeShellScript
|
||||
, python3
|
||||
, pkgs
|
||||
, lib
|
||||
, coreutils
|
||||
,
|
||||
}:
|
||||
let
|
||||
systemd-vaultd = pkgs.callPackage ../../default.nix { };
|
||||
systemd = pkgs.callPackage ../pkgs/systemd.nix { };
|
||||
in
|
||||
writeShellScript "unittests" ''
|
||||
set -eu -o pipefail
|
||||
export PATH=${lib.makeBinPath [python3.pkgs.pytest coreutils systemd]}
|
||||
export SYSTEMD_VAULTD_BIN=${systemd-vaultd}/bin/systemd-vaultd
|
||||
export TMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf $TMPDIR' EXIT
|
||||
cp --no-preserve=mode --preserve=timestamps -r ${../..} "$TMPDIR/source"
|
||||
cd "$TMPDIR/source"
|
||||
pytest -s ./tests
|
||||
# we need this in our nixos tests
|
||||
touch /tmp/success
|
||||
''
|
||||
writeShellScript "unittests" ''
|
||||
set -eu -o pipefail
|
||||
export PATH=${lib.makeBinPath [python3.pkgs.pytest coreutils systemd]}
|
||||
export SYSTEMD_VAULTD_BIN=${systemd-vaultd}/bin/systemd-vaultd
|
||||
export TMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf $TMPDIR' EXIT
|
||||
cp --no-preserve=mode --preserve=timestamps -r ${../..} "$TMPDIR/source"
|
||||
cd "$TMPDIR/source"
|
||||
pytest -s ./tests
|
||||
# we need this in our nixos tests
|
||||
touch /tmp/success
|
||||
''
|
||||
|
@ -0,0 +1,20 @@
|
||||
[tool.ruff]
|
||||
line-length = 88
|
||||
|
||||
select = ["E", "F", "I"]
|
||||
ignore = [ "E501" ]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
warn_redundant_casts = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "setuptools.*"
|
||||
ignore_missing_imports = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "pytest.*"
|
||||
ignore_missing_imports = true
|
@ -1,15 +1,15 @@
|
||||
{pkgs ? import <nixpkgs> {}}:
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
with pkgs;
|
||||
mkShellNoCC {
|
||||
buildInputs = [
|
||||
python3.pkgs.pytest
|
||||
python3.pkgs.mypy
|
||||
mkShellNoCC {
|
||||
buildInputs = [
|
||||
python3.pkgs.pytest
|
||||
python3.pkgs.mypy
|
||||
|
||||
golangci-lint
|
||||
vault
|
||||
systemd
|
||||
hivemind
|
||||
go
|
||||
just
|
||||
];
|
||||
}
|
||||
golangci-lint
|
||||
vault
|
||||
systemd
|
||||
hivemind
|
||||
go
|
||||
just
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue