greymd / tmux-xpanes

Awesome tmux-based terminal divider
MIT License
1.96k stars 61 forks source link

Use GitHub Actions #140

Closed greymd closed 4 years ago

greymd commented 4 years ago

Let us consider to use GitHub Actions. I expect testing time becomes shorter than usual since it can run many processes parallelly than TravisCI. I guess.

greymd commented 4 years ago

It is impossible to migrate tests to GitHub Actions. Here is the current testing environment provided by TravisCI. tmux session can be opened since pseudo-terminal is provided.

Screenshot 2020-04-28 at 23 49 43

In GitHub Actions however, all the standard stream are connecting to pipes.

Screenshot 2020-04-29 at 00 03 33

We cannot simulate tmux-xpanes because tmux session cannot be opened properly. Let me give up GitHub Actions.

greymd commented 4 years ago

I've tried more times. However tmux cannot attach the session.

Screenshot 2020-04-30 at 21 33 59

nicm commented 4 years ago

That message means you need to set TERM, try setting TERM=ansi or TERM=xterm.

But you would be better if possible just to have tmux detached, although perhaps that is impossible with how your tests work.

greymd commented 4 years ago

thx @nicm tmux works on GitHub Actions and test is passed!

Screenshot 2020-05-01 at 22 58 24
greymd commented 4 years ago

Migration is over. tmux-xpane's test had taken over 6 hours before.

https://travis-ci.org/github/greymd/tmux-xpanes/builds/676944678 Screenshot 2020-05-06 at 15 01 27

However, it only takes less than 30 minutes now.

https://github.com/greymd/tmux-xpanes/actions/runs/97156917 Screenshot 2020-05-06 at 15 06 54

Finally tmux works inside of GitHub Actions by using script, setting TERM variable and providing terminal size with stty like this.

script -e -c /bin/bash -c 'stty rows 40 cols 80;TERM=xterm bash ./test.sh'
greymd commented 4 years ago

As you can see here, GitHub Actions works perfectly from v4.1.2