-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into new-colorscheme
- Loading branch information
Showing
8 changed files
with
202 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
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 | ||
schedule: | ||
# daily 9AM EST | ||
- cron: "0 14 * * *" | ||
|
||
jobs: | ||
plenary: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Neovim nightly | ||
uses: rhysd/action-setup-vim@v1 | ||
with: | ||
neovim: true | ||
version: nightly | ||
|
||
- name: Setup Kitty | ||
run: | | ||
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin launch=n | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y xfce4 libxcb-xkb1 | ||
# 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_vnc }} | ||
run: | | ||
Xvfb :1 -screen 0 1024x768x16 & | ||
- name: (debug) Start TurboVNC | ||
if: ${{ inputs.enable_debug_vnc }} | ||
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 -SecurityTypes None | ||
- name: (debug) Setup ngrok session | ||
if: ${{ inputs.enable_debug_vnc }} | ||
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) Setup tmate session | ||
if: ${{ inputs.enable_debug_tmate || inputs.enable_debug_vnc }} | ||
uses: mxschmitt/action-tmate@v3 | ||
|
||
- name: Test kitty-scrollback.nvim | ||
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.