From 08500aa06c85e2eb928fe5e7fe1a8d8ef554bfbf Mon Sep 17 00:00:00 2001 From: adueck Date: Wed, 29 Nov 2023 11:18:47 +0400 Subject: [PATCH] try nix for ci --- .github/workflows/test-nix.yml | 18 ++++++++++++++++++ dev | 2 ++ shell.nix | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 .github/workflows/test-nix.yml create mode 100755 dev create mode 100644 shell.nix diff --git a/.github/workflows/test-nix.yml b/.github/workflows/test-nix.yml new file mode 100644 index 0000000..e84eaea --- /dev/null +++ b/.github/workflows/test-nix.yml @@ -0,0 +1,18 @@ +name: "Test Nix" +on: + pull_request: + push: +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v18 + with: + nix_path: nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.05" + - uses: workflow/nix-shell-action@v3 + with: + packages: nodejs_20,pandoc + script: | + node --version + pandoc --version diff --git a/dev b/dev new file mode 100755 index 0000000..09e9103 --- /dev/null +++ b/dev @@ -0,0 +1,2 @@ +nix-shell --command return +node --version diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..8002530 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.05"; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShell { + packages = with pkgs; [ + nodejs_20 + ]; +}