mirror of
https://github.com/pjones/plasma-manager.git
synced 2024-10-05 19:58:27 +03:00
add github CI (#70)
This commit is contained in:
parent
72273b9028
commit
02a9761ac6
17
.github/workflows/ci.yml
vendored
Normal file
17
.github/workflows/ci.yml
vendored
Normal file
@ -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
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,3 @@
|
||||
/example/result
|
||||
result-*
|
||||
result
|
||||
.direnv
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.plasma = {
|
||||
enable = true;
|
||||
|
@ -3,7 +3,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from typing import Dict
|
||||
from typing import Dict, Optional
|
||||
|
||||
|
||||
class KConfParser:
|
||||
@ -89,7 +89,7 @@ class KConfParser:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user