Skip to content

Commit

Permalink
add github CI (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1-s authored Feb 23, 2024
1 parent 72273b9 commit 02a9761
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Check"
on:
pull_request:
# cancel previous runs when pushing new changes
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: "system-features = kvm nixos-test"
- run: nix flake check -L --keep-going
- run: nix flake check -L --keep-going ./example
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/example/result
result-*
result
.direnv
2 changes: 1 addition & 1 deletion example/home.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ ... }:
{ pkgs, ... }:
{
programs.plasma = {
enable = true;
Expand Down
4 changes: 2 additions & 2 deletions script/write_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import re
import sys
from typing import Dict
from typing import Dict, Optional


class KConfParser:
Expand Down Expand Up @@ -89,7 +89,7 @@ def save(self):
f.write(f"{self.key_value_to_line(key, value)}\n")

@staticmethod
def get_key_value(line: str) -> tuple[str, str | None]:
def get_key_value(line: str) -> tuple[str, Optional[str]]:
line_splitted = line.split("=", 1)
key = line_splitted[0].strip()
value = line_splitted[1].strip() if len(line_splitted) > 1 else None
Expand Down

0 comments on commit 02a9761

Please sign in to comment.