Skip to content

Commit

Permalink
ci: Fix nightly tests (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak authored Jan 8, 2024
1 parent c60cf77 commit 3a5148f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- master

env:
CI: true

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
25 changes: 25 additions & 0 deletions tests/minimal_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,31 @@ vim.cmd.language('en_US.utf-8')
vim.env.TZ = 'Europe/London'
vim.g.mapleader = ','

-- NOTE: This is a workaround to get the clipboard working in the CI environment
-- where the clipboard provider does not exist.
if vim.env.CI == 'true' then
vim.g.org_custom_clipboard = {}
vim.g.clipboard = {
name = 'org_custom_clipboard',
copy = {
['+'] = function(lines, regtype)
vim.g.org_custom_clipboard = { lines, regtype }
end,
['*'] = function(lines, regtype)
vim.g.org_custom_clipboard = { lines, regtype }
end,
},
paste = {
['+'] = function()
return vim.g.org_custom_clipboard or {}
end,
['*'] = function()
return vim.g.org_custom_clipboard or {}
end,
},
}
end

require('orgmode').setup_ts_grammar()
require('nvim-treesitter.configs').setup({
ensure_installed = { 'org' },
Expand Down

0 comments on commit 3a5148f

Please sign in to comment.