Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): run Nix flake checks in GitHub Actions workflow #9

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install testing dependencies
run: |
{ apk add --no-cache ansible sudo ; } || :
Expand All @@ -38,3 +38,15 @@ jobs:
# OpenRC under Alpine Linux) in a container.
run: |
ansible-playbook -vv --become -c local -i localhost, -e kodi_service_enabled=false ./tests/test.yml
nix:
name: Run Nix actions
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v8
- name: Set up Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v3
- name: Run Nix flake checks
run: |
nix flake check -L
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
system,
...
}: {
# `nix run '.#' -- <devshell-command>`
apps.default = config.devShells.default.flakeApp;

devshells.default = {
commands = [
# Local GitHub actions runner. Run `act -j native` to execute the
Expand Down Expand Up @@ -93,6 +96,8 @@
];
};
in {
inherit (config.devShells) default;

rpi4-initrd = rpi4.config.system.build.initialRamdisk;
rpi4-kernel = rpi4.config.system.build.kernel;

Expand Down
Loading