Skip to content

Commit 3a5148f

Browse files
ci: Fix nightly tests (#648)
1 parent c60cf77 commit 3a5148f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
env:
12+
CI: true
13+
1114
jobs:
1215
lint:
1316
runs-on: ubuntu-latest

tests/minimal_init.lua

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,31 @@ vim.cmd.language('en_US.utf-8')
100100
vim.env.TZ = 'Europe/London'
101101
vim.g.mapleader = ','
102102

103+
-- NOTE: This is a workaround to get the clipboard working in the CI environment
104+
-- where the clipboard provider does not exist.
105+
if vim.env.CI == 'true' then
106+
vim.g.org_custom_clipboard = {}
107+
vim.g.clipboard = {
108+
name = 'org_custom_clipboard',
109+
copy = {
110+
['+'] = function(lines, regtype)
111+
vim.g.org_custom_clipboard = { lines, regtype }
112+
end,
113+
['*'] = function(lines, regtype)
114+
vim.g.org_custom_clipboard = { lines, regtype }
115+
end,
116+
},
117+
paste = {
118+
['+'] = function()
119+
return vim.g.org_custom_clipboard or {}
120+
end,
121+
['*'] = function()
122+
return vim.g.org_custom_clipboard or {}
123+
end,
124+
},
125+
}
126+
end
127+
103128
require('orgmode').setup_ts_grammar()
104129
require('nvim-treesitter.configs').setup({
105130
ensure_installed = { 'org' },

0 commit comments

Comments
 (0)