Showing with 2,409 additions and 3,533 deletions.
  1. +3 −0 .envrc
  2. +12 −12 .github/workflows/test.yml
  3. +11 −0 .gitignore
  4. +1 −1 README.md
  5. +4 −2 action.yml
  6. +156 −0 devenv.lock
  7. +15 −0 devenv.nix
  8. +6 −0 devenv.yaml
  9. +460 −424 dist/main/index.js
  10. +10 −10 package.json
  11. +0 −5 shell.nix
  12. +8 −3 src/main.ts
  13. +107 −59 tsconfig.json
  14. +1,616 −3,017 yarn.lock
3 changes: 3 additions & 0 deletions .envrc
@@ -0,0 +1,3 @@
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0="

use devenv
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Expand Up @@ -12,12 +12,12 @@ jobs:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: yarn install --frozen-lockfile
- run: yarn build
# check if typescript generation was committed
- run: git diff --exit-code
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v23
- name: Test public cache
uses: ./
with:
Expand All @@ -31,10 +31,10 @@ jobs:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v23
- name: Test public cache no signing key
uses: ./
with:
Expand All @@ -48,10 +48,10 @@ jobs:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v23
- name: Test private cache
uses: ./
with:
Expand All @@ -66,10 +66,10 @@ jobs:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v23
- name: Test private cache
uses: ./
with:
Expand All @@ -84,12 +84,12 @@ jobs:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v18
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-21.05
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://nixos-nix-install-tests.cachix.org/serve/kkq45x7yrzvxq8627fi6hkswnfa7mg2l/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
- run: yarn install --frozen-lockfile
- run: yarn build
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Expand Up @@ -94,3 +94,14 @@ typings/

# Skip the lib folder
lib/

# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -14,7 +14,7 @@ Before each job, derivations to be built are first substituted (if they exist) f

## Getting started

Follow [Continuous Integration with GitHub Actions](https://nix.dev/tutorials/continuous-integration-github-actions.html) tutorial.
Follow [Continuous Integration with GitHub Actions](https://nix.dev/tutorials/nixos/continuous-integration-github-actions) tutorial.

See [action.yml](action.yml) for all options.

Expand Down
6 changes: 4 additions & 2 deletions action.yml
Expand Up @@ -8,7 +8,7 @@ inputs:
extraPullNames:
description: 'Comma-separated list of names for extra cachix caches to pull/substitute'
authToken:
description: 'Authentication token for Cachix, needed only for private cache access'
description: 'Authentication token for Cachix, needed for private cache access or to push using an Auth Token'
signingKey:
description: 'Signing key secret retrieved after creating binary cache on https://cachix.org'
skipPush:
Expand All @@ -21,10 +21,12 @@ inputs:
description: 'Extra command-line arguments to pass to cachix. If empty, defaults to -j8'
installCommand:
description: 'Override the default cachix installation method'
skipAddingSubstituter:
description: 'Set to true to skip adding cachix cache as a substitute'
branding:
color: 'blue'
icon: 'database'
runs:
using: 'node16'
using: 'node20'
main: 'dist/main/index.js'
post: 'dist/main/index.js'
156 changes: 156 additions & 0 deletions devenv.lock
@@ -0,0 +1,156 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1692203620,
"narHash": "sha256-9SF/H8oCWv166q5o+JtV7tK+koydgFMu02HCB27UWpU=",
"owner": "cachix",
"repo": "devenv",
"rev": "eee80243720b7f284128873a9694a520d9967b2f",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1692311226,
"narHash": "sha256-mRzNup0PIUD6YxbrYvjzL7f+1oaOGy9nmGCV3AZkQus=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ef8288935ba859fc3b30632fa6e04705f81b9c2a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1692274144,
"narHash": "sha256-BxTQuRUANQ81u8DJznQyPmRsg63t4Yc+0kcyq6OLz8s=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "7e3517c03d46159fdbf8c0e5c97f82d5d4b0c8fa",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
15 changes: 15 additions & 0 deletions devenv.nix
@@ -0,0 +1,15 @@
{ pkgs, ... }:

let
node = pkgs.nodejs_20;
in
{
packages = [
pkgs.act
pkgs.yarn
node
node.pkgs.typescript-language-server
];

languages.typescript.enable = true;
}
6 changes: 6 additions & 0 deletions devenv.yaml
@@ -0,0 +1,6 @@
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
permittedInsecurePackages:
- nodejs-16.20.2