2020-04-08 16:39:06 +12:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2020-04-15 14:21:28 +01:00
|
|
|
nixpkgs-fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-30 07:24:08 -05:00
|
|
|
- uses: cachix/install-nix-action@v16
|
2021-08-11 18:11:38 -05:00
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2021-11-04 12:53:38 -07:00
|
|
|
- uses: actions/checkout@v2.4.0
|
2020-04-15 14:21:28 +01:00
|
|
|
- name: Check format
|
|
|
|
run: ./check-fmt
|
|
|
|
|
2021-12-25 21:10:37 -08:00
|
|
|
matrix_generate:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2.4.0
|
2021-12-30 07:24:08 -05:00
|
|
|
- uses: cachix/install-nix-action@v16
|
2021-12-25 21:10:37 -08:00
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- id: set-matrix
|
2021-12-30 07:23:53 -05:00
|
|
|
run: |
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
matrix="$(nix-instantiate --eval --json --expr 'builtins.attrNames (import ./tests {})' | jq '{attr: .}')"
|
|
|
|
echo "::set-output name=matrix::$matrix"
|
2021-12-25 21:10:37 -08:00
|
|
|
|
|
|
|
builds:
|
|
|
|
needs: matrix_generate
|
|
|
|
runs-on: ubuntu-latest
|
2020-04-08 16:39:06 +12:00
|
|
|
strategy:
|
2021-12-25 21:10:37 -08:00
|
|
|
matrix: ${{fromJSON(needs.matrix_generate.outputs.matrix)}}
|
2020-04-08 16:39:06 +12:00
|
|
|
steps:
|
2021-12-25 21:10:37 -08:00
|
|
|
- uses: actions/checkout@v2.4.0
|
2021-12-30 07:24:08 -05:00
|
|
|
- uses: cachix/install-nix-action@v16
|
2021-12-25 21:10:37 -08:00
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- uses: cachix/cachix-action@v10
|
|
|
|
with:
|
|
|
|
name: poetry2nix
|
|
|
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
|
|
|
- run: nix-shell -p nix-build-uncached --run 'nix-build-uncached --keep-going --show-trace tests/default.nix -A ${{ matrix.attr }}'
|