mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-09 20:16:41 -04:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
88 lines
3 KiB
YAML
88 lines
3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
sort-build-systems:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: cachix/install-nix-action@v19
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- uses: actions/checkout@v3
|
|
- name: Check format
|
|
run: nix-shell --packages jq --pure --run 'diff overrides/build-systems.json <(jq --raw-output --sort-keys < overrides/build-systems.json)'
|
|
|
|
nixpkgs-fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: cachix/install-nix-action@v19
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- uses: actions/checkout@v3
|
|
- name: Check format
|
|
run: nix-shell --arg packages 'pkgs:[ pkgs.nixpkgs-fmt ]' --run 'nixpkgs-fmt --check .'
|
|
|
|
black-fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: cachix/install-nix-action@v19
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/cachix-action@v12
|
|
with:
|
|
name: poetry2nix
|
|
signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw=="
|
|
- name: Check format
|
|
run: nix-shell --arg packages 'pkgs:[ pkgs.p2nix-tools.env ]' --run 'black --check .'
|
|
|
|
matrix_generate:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v19
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- id: set-matrix
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
matrix="$(nix-instantiate --eval --json --expr 'builtins.attrNames (import ./tests {})' | jq -rcM '{attr: .}')"
|
|
echo "::set-output name=matrix::$matrix"
|
|
|
|
builds-linux:
|
|
needs: matrix_generate
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix: ${{fromJSON(needs.matrix_generate.outputs.matrix)}}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v19
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- uses: cachix/cachix-action@v12
|
|
with:
|
|
name: poetry2nix
|
|
signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw=="
|
|
- 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 }}'
|
|
|
|
builds-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v19
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- uses: cachix/cachix-action@v12
|
|
with:
|
|
name: poetry2nix
|
|
signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw=="
|
|
- run: nix-shell --arg packages 'pkgs:[ pkgs.nix-build-uncached ]' --run 'nix-build-uncached -build-flags "-L" --keep-going --show-trace tests/default.nix'
|