Add CI job to verify that the action works

This commit is contained in:
Luc Perkins 2023-06-05 13:10:41 +02:00
parent 413adfff73
commit 492c89c171
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
4 changed files with 75 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

23
.github/workflows/ci.yaml vendored Normal file
View file

@ -0,0 +1,23 @@
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
run-x86_64-linux:
name: Run x86_64 Linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check flake.lock
uses: ./
run-x86_64-darwin:
name: Run x86_64 Darwin
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Check flake.lock
uses: ./

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1685836261,
"narHash": "sha256-rpxEPGeW4JZJcH58SQApJUtJ7w78VPtkF6Cut/Pq6Kg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dd4982554e18b936790da07c4ea2db7c7600f283",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View file

@ -0,0 +1,24 @@
# This flake.nix is only here to provide a flake.lock to check in CI
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f rec {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forAllSystems ({ pkgs }: {
default =
pkgs.mkShell {
packages = (with pkgs; [
nixpkgs-fmt
]);
};
});
};
}