Skip to content

Commit

Permalink
ci: add nix action
Browse files Browse the repository at this point in the history
  • Loading branch information
azahi committed Jan 13, 2025
1 parent b1efa9e commit fd3e4b9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Nix

on:
pull_request_target:
push:
branches:
- master

jobs:
check:
runs-on: [self-hosted, nixos]
steps:
- uses: actions/checkout@v4
- run: nix flake check
8 changes: 7 additions & 1 deletion nix/packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
_: {
perSystem =
{ pkgs, ... }:
{
config,
pkgs,
...
}:
{
legacyPackages = {
cosmovisor = pkgs.callPackage ./cosmovisor.nix { };
haqqPackages = pkgs.callPackages ./haqq { };
};

checks = config.legacyPackages.haqqPackages;
};
}
6 changes: 5 additions & 1 deletion nix/partitions/dev/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
imports = [ inputs.git-hooks-nix.flakeModule ];

perSystem =
{ config, pkgs, ... }:
{
config,
pkgs,
...
}:
{
pre-commit.settings.hooks = {
convco.enable = true;
Expand Down
8 changes: 7 additions & 1 deletion nix/tests/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{ inputs, ... }:
{
perSystem =
{ pkgs, ... }:
{
config,
pkgs,
...
}:
{
legacyPackages.nixosTests = {
haqqd-basic = pkgs.callPackage ./basic.nix {
imports = [ inputs.self.nixosModules.haqqd ];
};
};

checks = config.legacyPackages.nixosTests;
};
}

0 comments on commit fd3e4b9

Please sign in to comment.