-
Notifications
You must be signed in to change notification settings - Fork 12
151 lines (140 loc) · 7.02 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: tests
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:
inputs:
enable_debug_vnc:
required: false
type: boolean
default: false
enable_debug_tmate:
required: false
type: boolean
default: false
debug_kitty_version:
required: false
type: string
default: 'stable'
debug_nvim_version:
required: false
type: string
default: 'stable'
schedule:
# 6am EST
- cron: "0 10 * * *"
jobs:
plenary:
strategy:
matrix:
nvim_version:
- 'stable' # v0.10.0
- 'nightly'
kitty_version:
- 'stable' # 0.37.+
- 'nightly'
# update __branch-protection-rules.json and run __update_branch_protection_rules.sh when modified
# test all version of nvim released as of v0.9.0
# test only latest patch versions of kitty released as of v0.32.2
include:
# nvim versions + kitty stable
- nvim_version: 'v0.9.0'
kitty_version: 'stable'
- nvim_version: 'v0.9.5'
kitty_version: 'stable'
# nvim stable + kitty versions
- nvim_version: 'stable'
kitty_version: '0.32.2'
- nvim_version: 'stable'
kitty_version: '0.33.1'
- nvim_version: 'stable'
kitty_version: '0.34.1'
- nvim_version: 'stable'
kitty_version: '0.35.2'
- nvim_version: 'stable'
kitty_version: '0.36.4'
fail-fast: false
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
if: ${{ !(inputs.enable_debug_tmate || inputs.enable_debug_vnc) || (inputs.debug_kitty_version == matrix.kitty_version && inputs.debug_nvim_version == matrix.nvim_version) }}
uses: actions/checkout@v3
- name: Setup Neovim ${{ matrix.nvim_version }}
if: ${{ !(inputs.enable_debug_tmate || inputs.enable_debug_vnc) || (inputs.debug_kitty_version == matrix.kitty_version && inputs.debug_nvim_version == matrix.nvim_version) }}
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.nvim_version }}
- name: Setup Kitty ${{ matrix.kitty_version }}
if: ${{ !(inputs.enable_debug_tmate || inputs.enable_debug_vnc) || (inputs.debug_kitty_version == matrix.kitty_version && inputs.debug_nvim_version == matrix.nvim_version) }}
run: |
"$GITHUB_WORKSPACE/scripts/internal/__kitty_installer.sh" launch=n version=${{ matrix.kitty_version }}
- name: Install dependencies
if: ${{ !(inputs.enable_debug_tmate || inputs.enable_debug_vnc) || (inputs.debug_kitty_version == matrix.kitty_version && inputs.debug_nvim_version == matrix.nvim_version) }}
run: |
sudo apt update
sudo apt install -y xfce4 libxcb-xkb1 xsel tmux fish
# homebrew is not used but is required to reproduce an issue for a test case
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Start Xvfb
if: ${{ !(inputs.enable_debug_tmate || inputs.enable_debug_vnc) || (!inputs.enable_debug_vnc && (inputs.debug_kitty_version == matrix.kitty_version && inputs.debug_nvim_version == matrix.nvim_version)) }}
run: |
Xvfb :1 -screen 0 1024x768x16 &
- name: (debug) Start TurboVNC
if: ${{ inputs.enable_debug_vnc && (inputs.debug_kitty_version == matrix.kitty_version) && (inputs.debug_nvim_version == matrix.nvim_version) }}
run: |
mkdir -p "$GITHUB_WORKSPACE/tmp"
curl -s -L https://github.com/TurboVNC/turbovnc/releases/download/3.1/turbovnc_3.1_amd64.deb -o "$GITHUB_WORKSPACE/tmp/turbovnc.deb"
cd "$GITHUB_WORKSPACE/tmp" || exit 1
sudo dpkg -i turbovnc.deb
sudo apt update
sudo apt install -f
cd "$GITHUB_WORKSPACE" || exit 1
export PATH="/opt/TurboVNC/bin:$PATH"
vncserver -geometry 2560x1080 -SecurityTypes None
echo 'export PATH="/opt/TurboVNC/bin:$PATH"' >> "$HOME/.bashrc"
- name: (debug) Setup ngrok session
if: ${{ inputs.enable_debug_vnc && (inputs.debug_kitty_version == matrix.kitty_version) && (inputs.debug_nvim_version == matrix.nvim_version) }}
env:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
run: |
mkdir -p "$GITHUB_WORKSPACE/tmp/bin"
curl -s -L https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz -o "$GITHUB_WORKSPACE/tmp/ngrok.tgz"
cd "$GITHUB_WORKSPACE/tmp" || exit 1
tar -xvf ngrok.tgz -C "$GITHUB_WORKSPACE/tmp/bin"
cd "$GITHUB_WORKSPACE" || exit 1
export PATH="$GITHUB_WORKSPACE/tmp/bin:$PATH"
ngrok config add-authtoken "$NGROK_AUTH_TOKEN"
ngrok tcp 22 --log=stdout > "$GITHUB_WORKSPACE/tmp/ngrok.log" &
sleep 1 # wait for ngrok to start
NGROK_TLS_URL="$(curl --silent http://127.0.0.1:4040/api/tunnels | jq -r '.tunnels[0].public_url')"
host="$(echo $NGROK_TLS_URL | awk -F:// '{print $2}' | awk -F: ' {print $1}')"
port="$(echo $NGROK_TLS_URL | awk -F:// '{print $2}' | awk -F: ' {print $2}')"
printf '\n\nngrok agent running avaible at %s\n\nRun the following command on your machine:\n\n ssh -L 59000:localhost:5901 -C -N -p %s -l runner %s\n\nConnect on your machine at: localhost:59000\n\n' $NGROK_TLS_URL $port $host
- name: (debug) Add env vars to .bashrc
if: ${{ (inputs.enable_debug_tmate || inputs.enable_debug_vnc) && (inputs.debug_kitty_version == matrix.kitty_version) && (inputs.debug_nvim_version == matrix.nvim_version) }}
run: |
echo 'export KITTY_CONFIG_DIRECTORY="$GITHUB_WORKSPACE/tests"' >> "$HOME/.bashrc"
echo 'export PATH=$HOME/.local/kitty.app/bin:/home/linuxbrew/.linuxbrew/bin:$PATH' >> "$HOME/.bashrc"
echo 'export DISPLAY=:1' >> "$HOME/.bashrc"
echo 'export PS1="\[\e[34m\]$ \[\e[m\]"' >> "$HOME/.bashrc"
- name: (debug) Setup tmate session
if: ${{ (inputs.enable_debug_tmate || inputs.enable_debug_vnc) && (inputs.debug_kitty_version == matrix.kitty_version) && (inputs.debug_nvim_version == matrix.nvim_version) }}
uses: mxschmitt/action-tmate@v3
- name: Test kitty-scrollback.nvim
if: ${{ !(inputs.enable_debug_tmate || inputs.enable_debug_vnc) || (inputs.debug_kitty_version == matrix.kitty_version && inputs.debug_nvim_version == matrix.nvim_version) }}
run: |
# TODO: improve the env var exports, github actions are making it hard so I gave up for now
export KITTY_CONFIG_DIRECTORY="$GITHUB_WORKSPACE/tests"
export PATH=$HOME/.local/kitty.app/bin:/home/linuxbrew/.linuxbrew/bin:$PATH
export DISPLAY=:1
export PS1="\[\e[34m\]$ \[\e[m\]"
echo 'export KITTY_CONFIG_DIRECTORY="$GITHUB_WORKSPACE/tests"' >> "$HOME/.bashrc"
echo 'export PATH=$HOME/.local/kitty.app/bin:/home/linuxbrew/.linuxbrew/bin:$PATH' >> "$HOME/.bashrc"
echo 'export DISPLAY=:1' >> "$HOME/.bashrc"
echo 'export PS1="\[\e[34m\]$ \[\e[m\]"' >> "$HOME/.bashrc"
make test-all-sequential