Skip to content

Commit

Permalink
12 add ci (#16)
Browse files Browse the repository at this point in the history
* Create tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update backend.nix

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* changed back to apt

* added nix path

* added nix path

* changed to a script on marketplace

* changed to a script on marketplace

* changed to a script on marketplace

* Update putricide.nix

* disabled rebuilds, they be very slow
  • Loading branch information
Mast3rwaf1z authored Mar 11, 2024
1 parent e38dd78 commit 48b8615
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test NixOS configuration

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1

- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-23.11

- name: build-backend
run: nix build -f ./packages/backend.nix
- name: build-putricide
run: nix build -f ./packages/putricide.nix
#- name: build-skademaskinen
# run: nix shell nixpkgs#nixos-rebuild --command nixos-rebuild build-vm --flake .#Skademaskinen
#- name: build-laptop
# run: nix shell nixpkgs#nixos-rebuild --command nixos-rebuild build-vm --flake .#laptop
#- name: build-desktop
# run: nix shell nixpkgs#nixos-rebuild --command nixos-rebuild build-vm --flake .#desktop
2 changes: 1 addition & 1 deletion packages/backend.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs,}:let
{pkgs ? import <nixpkgs> {}, ...}:let
py = (pkgs.python3.withPackages (pyPkgs: with pyPkgs; [
requests
python-nmap
Expand Down
4 changes: 2 additions & 2 deletions packages/putricide.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs,}: pkgs.maven.buildMavenPackage {
{pkgs ? import <nixpkgs> {}, ...}: pkgs.maven.buildMavenPackage {
name = "putricide";
pname = "putricide";
version = "3.38a";
Expand All @@ -22,4 +22,4 @@
echo "${pkgs.jdk21}/bin/java -jar $out/share/Putricide/ppbot.jar \$@" > $out/bin/skademaskinen-putricide
chmod +x $out/bin/skademaskinen-putricide
'';
}
}

0 comments on commit 48b8615

Please sign in to comment.