Skip to content

Commit

Permalink
ci: move type checking code to use the autogenerated .luarc.json cr…
Browse files Browse the repository at this point in the history
…eated by devenv

this prevents errors related to `busted` and other testing utilities
  • Loading branch information
vhyrro committed May 23, 2024
1 parent 4121174 commit e82cae8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 38 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/.luarc.json

This file was deleted.

31 changes: 9 additions & 22 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,24 @@ on:
- '*'

jobs:
build:
type-check:
name: Type Check Code Base
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Checkout dependency neodev # get neodev and neovim/runtime for builtin types
uses: actions/checkout@v3
with:
repository: "folke/neodev.nvim"
path: "deps/neodev.nvim"
- name: Checkout neovim for type annotations
uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@v10
- uses: cachix/cachix-action@v14
with:
repository: "neovim/neovim"
path: "deps/neovim"

- uses: leafo/gh-actions-lua@v9 # get luarocks dependencies for their types (eg `PathlibPath`)
with:
luaVersion: "5.1"
- uses: leafo/gh-actions-luarocks@v4
- name: install dependencies
run: |
luarocks init
luarocks install --only-deps ./*.rockspec
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Enter development shell
run: devenv shell
- name: Type Check Code Base
uses: mrcjkb/[email protected]
with:
configpath: .github/workflows/.luarc.json
configpath: ".luarc.json"
directories: |
lua
2 changes: 1 addition & 1 deletion devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
...
}: let
neorg-dependencies = builtins.fromJSON (builtins.readFile ./res/deps.json);
test-dependencies = [ "busted" ];
test-dependencies = [];
luarc = pkgs.mk-luarc {
plugins = builtins.attrNames neorg-dependencies ++ test-dependencies;
};
Expand Down

0 comments on commit e82cae8

Please sign in to comment.