DEV Community

Shunsuke Suzuki
Shunsuke Suzuki

Posted on

Debug application in Windows by GitHub Actions and action-tmate

In this post I explain how to prepare Windows environment quickly for non Windows users.

I usually use macOS laptop. Sometimes I'd like to verify my OSS in Windows, but I have no Windows laptop. So I have to prepare Windows environment somehow.

When I worked on aqua's Windows Support, I used Amazon Workspaces.
Amazon Workspaces is useful,
but it's bothersome to launch an instance and set up development environment (Go, Git, etc).
And it costs. 💸

To solve the issue, I set up GitHub Actions Workflow using action-tmate.
You can launch a Windows runner by GitHub Actions workflow_dispatch and connect it via SSH using action-tmate.
Various tools are pre-installed in windows-latest, and you can also automate the set up by actions.
This is much easier than setting up Windows remote desktop from scratch.

Note that if GitHub Actions isn't free in private repositories.
In my use case the repository is public so there is no problem.

Requirements

  1. To restrict the SSH connection, you have to create SSH key and register it to GitHub

How to use

  1. Run GitHub Actions Workflow via workflow_dispatch

GitHub Actions Workflow

image

--

image

  1. Run ssh command in your terminal
$ ssh yTNssfkqxN2bVCLvqYCn3csjS@sfo2.tmate.io
Enter fullscreen mode Exit fullscreen mode

image

That's it. There are some restriction compared with desktop environment, but you can verify the application in Windows instantly.

Reference

Top comments (0)