{"id":19208041,"url":"https://github.com/ubuntu/wsl-actions-example","last_synced_at":"2025-05-12T18:49:34.167Z","repository":{"id":168663748,"uuid":"638831865","full_name":"ubuntu/wsl-actions-example","owner":"ubuntu","description":"A small demonstration on how to use our Github actions to run your CI on WSL","archived":false,"fork":false,"pushed_at":"2024-02-05T15:06:10.000Z","size":13,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-20T15:44:28.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubuntu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-10T07:47:32.000Z","updated_at":"2025-03-18T05:22:02.000Z","dependencies_parsed_at":"2024-02-05T16:29:05.443Z","dependency_job_id":null,"html_url":"https://github.com/ubuntu/wsl-actions-example","commit_stats":null,"previous_names":["ubuntu/wsl-actions-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fwsl-actions-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fwsl-actions-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fwsl-actions-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubuntu%2Fwsl-actions-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubuntu","download_url":"https://codeload.github.com/ubuntu/wsl-actions-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253803721,"owners_count":21966961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T13:23:55.835Z","updated_at":"2025-05-12T18:49:31.728Z","avatar_url":"https://github.com/ubuntu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example usage of WSL Github actions\n\n[![Code quality](https://github.com/ubuntu/wsl-actions-example/actions/workflows/test.yaml/badge.svg)](https://github.com/ubuntu/wsl-actions-example/actions/workflows/test.yaml)\n[![Code quality](https://github.com/ubuntu/wsl-actions-example/actions/workflows/test_wsl.yaml/badge.svg)](https://github.com/ubuntu/wsl-actions-example/actions/workflows/test_wsl.yaml)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/ubuntu/gowsl/blob/main/LICENSE)\n\nOver at the [Ubuntu/WSL](https://github.com/ubuntu/WSL) repository, we developed some GitHub actions to\nmake your life easier when running your CI in WSL. This is needed because GitHub runners do not support\nWSL. Just setting up an Azure VM will not cut it either, because the runner will run in session 0, which means\nthat Microsoft Store applications such as WSL cannot be run.\n\n## How to run your CI on WSL\n1. Set up a Windows machine to run your CI in. GitHub runners won't do the job, but Azure VMs will.\n2. Set up an auto-logon in your Windows machine. See [here](https://learn.microsoft.com/en-us/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon) for a step-by-step guide.\n3. Add the GitHub runner as a startup application (specifically, the `run.cmd` batch file in your actions runner).\n\nYou're done! Your CI yaml files will need some extra work, however, as you need to allocate and deallocate the VM on demand.\nThe runner needs to run on Windows and not directly on WSL, as WSL instances will shut themselves down automatically, so we\nimplemented some utilities to install and update WSL and the distro, as well as to run scripts.\n\nYou can find these actions and some more in-depth explanation for the setup [here](github.com/Ubuntu/WSL/.github/actions).\n\n## What is this repo?\nThis repository contains a very simple library `src.py` with a function that returns different results inside and outside WSL.\nTo test it properly, we run a test on each platform:\n- Ubuntu in a GitHub Runner: [test.yaml](./.github/workflows/test.yaml)\n- Ubuntu in WSL: [test_wsl.yaml](./.github/workflows/test_wsl.yaml)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fwsl-actions-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubuntu%2Fwsl-actions-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubuntu%2Fwsl-actions-example/lists"}