Skip to content

Commit 0d5eb85

Browse files
committed
fix CI
1 parent 857331b commit 0d5eb85

File tree

4 files changed

+173
-16
lines changed

4 files changed

+173
-16
lines changed

.builds/qbpm.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ repositories:
33
nixpkgs: https://nixos.org/channels/nixos-unstable
44
sources:
55
- https://git.sr.ht/~pvsr/qbpm
6+
environment:
7+
NIX: "nix --extra-experimental-features nix-command --extra-experimental-features flakes"
68
tasks:
79
- deps: |
810
cd qbpm
9-
nix-shell --quiet --run exit
11+
$NIX build .#devShells.x86_64-linux.ci
1012
- format: |
1113
cd qbpm
12-
nix-shell --run 'black --diff --check qbpm tests'
14+
$NIX develop .#ci -c black --diff --check qbpm tests
1315
- mypy: |
1416
cd qbpm
15-
nix-shell --run 'mypy qbpm tests'
17+
$NIX develop .#ci -c mypy qbpm tests
1618
- pytest: |
1719
cd qbpm
18-
nix-shell --run pytest
20+
$NIX develop .#ci -c pytest

flake.lock

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@
1313
flake-utils.lib.eachDefaultSystem (
1414
system: let
1515
pkgs = nixpkgs.legacyPackages.${system};
16+
mkDevShell = args:
17+
pkgs.mkShell (args
18+
// {
19+
buildInputs = [
20+
(pkgs.python3.withPackages (ps:
21+
with ps; [
22+
pyxdg
23+
setuptools-scm
24+
pytest
25+
pylint
26+
mypy
27+
black
28+
]))
29+
];
30+
});
1631
in rec {
1732
packages = flake-utils.lib.flattenTree rec {
1833
qbpm = import ./. {inherit pkgs;};
@@ -22,19 +37,9 @@
2237
qbpm = flake-utils.lib.mkApp {drv = packages.qbpm;};
2338
default = qbpm;
2439
};
25-
devShell = pkgs.mkShell {
40+
devShells.ci = mkDevShell {};
41+
devShells.default = mkDevShell {
2642
inherit (self.checks.${system}.pre-commit-check) shellHook;
27-
buildInputs = [
28-
(pkgs.python3.withPackages (ps:
29-
with ps; [
30-
pyxdg
31-
setuptools-scm
32-
pytest
33-
pylint
34-
mypy
35-
black
36-
]))
37-
];
3843
};
3944

4045
checks = {

mypy.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ warn_unused_ignores = True
88

99
[mypy-xdg.*]
1010
ignore_missing_imports = True
11+
12+
[mypy-tests.*]
13+
disallow_untyped_defs = False

0 commit comments

Comments
 (0)