mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
Merge pull request #622 from nix-community/ci-perf
Improve CI performance
This commit is contained in:
commit
bee08d0554
2 changed files with 26 additions and 23 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
- name: Check format
|
- name: Check format
|
||||||
run: ./check-fmt
|
run: nix-shell --arg packages 'pkgs:[ pkgs.nixpkgs-fmt ]' --run 'nixpkgs-fmt --check .'
|
||||||
|
|
||||||
py2-compat:
|
py2-compat:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -22,7 +22,7 @@ jobs:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
- name: Check format
|
- name: Check format
|
||||||
run: nix-shell --run 'git ls-files | grep -Pv "^tools" | grep -P "\.py$" | xargs py2-astparse'
|
run: nix-shell --arg packages 'pkgs:[ pkgs.p2nix-tools.py2-astparse ]' --run 'git ls-files | grep -Pv "^tools" | grep -P "\.py$" | xargs py2-astparse'
|
||||||
|
|
||||||
black-fmt:
|
black-fmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -32,7 +32,7 @@ jobs:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
- name: Check format
|
- name: Check format
|
||||||
run: nix-shell --run 'black --check .'
|
run: nix-shell --arg packages 'pkgs:[ pkgs.p2nix-tools.env ]' --run 'black --check .'
|
||||||
|
|
||||||
matrix_generate:
|
matrix_generate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -64,4 +64,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: poetry2nix
|
name: poetry2nix
|
||||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||||
- run: nix-shell --run 'nix-build-uncached -build-flags "-L" --keep-going --show-trace tests/default.nix -A ${{ matrix.attr }}'
|
- run: nix-shell --arg packages 'pkgs:[ pkgs.nix-build-uncached ]' --run 'nix-build-uncached -build-flags "-L" --keep-going --show-trace tests/default.nix -A ${{ matrix.attr }}'
|
||||||
|
|
41
shell.nix
41
shell.nix
|
@ -1,21 +1,7 @@
|
||||||
let
|
{ packages ? pkgs: [
|
||||||
sources = import ./nix/sources.nix;
|
pkgs.p2nix-tools.env
|
||||||
pkgs = import sources.nixpkgs {
|
pkgs.p2nix-tools.py2-astparse
|
||||||
overlays = [
|
pkgs.p2nix-tools.flamegraph
|
||||||
(import ./overlay.nix)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
tools = pkgs.callPackage ./tools { };
|
|
||||||
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
|
|
||||||
NIX_PATH = "nixpkgs=${sources.nixpkgs}";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
tools.env
|
|
||||||
tools.py2-astparse
|
|
||||||
tools.flamegraph
|
|
||||||
pkgs.nixpkgs-fmt
|
pkgs.nixpkgs-fmt
|
||||||
pkgs.poetry
|
pkgs.poetry
|
||||||
pkgs.niv
|
pkgs.niv
|
||||||
|
@ -23,5 +9,22 @@ pkgs.mkShell {
|
||||||
pkgs.nix-prefetch-git
|
pkgs.nix-prefetch-git
|
||||||
pkgs.nix-eval-jobs
|
pkgs.nix-eval-jobs
|
||||||
pkgs.nix-build-uncached
|
pkgs.nix-build-uncached
|
||||||
];
|
]
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
sources = import ./nix/sources.nix;
|
||||||
|
pkgs = import sources.nixpkgs {
|
||||||
|
overlays = [
|
||||||
|
(import ./overlay.nix)
|
||||||
|
(self: super: {
|
||||||
|
p2nix-tools = self.callPackage ./tools { };
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
NIX_PATH = "nixpkgs=${sources.nixpkgs}";
|
||||||
|
packages = packages pkgs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue