Skip to content

Commit

Permalink
Add WSL workflow for Python unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Nov 12, 2024
1 parent 488a320 commit 5aa0ad6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/py-unit-tests-wsl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Python Unit Tests on WSL

on:
push:
branches: [ "main", "openhands-workspace" ]
pull_request:
branches: [ "main", "openhands-workspace" ]

jobs:
test:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4

- name: Set up WSL
uses: Vampire/setup-wsl@v3
with:
distribution: Ubuntu-22.04
update: true
additional-packages: python3-pip python3-venv

- name: Set up Python ${{ matrix.python-version }}
shell: wsl-bash {0}
run: |
python3 -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run Tests
shell: wsl-bash {0}
run: |
. venv/bin/activate
poetry run pytest tests/

0 comments on commit 5aa0ad6

Please sign in to comment.