From 2cdeae8fdd365bad255a8e8e96296f0addcbf201 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 4 Jul 2023 14:42:53 -0700 Subject: [PATCH] aider: Create a Windows workflow for running tests based on the existing Python workflow. # Context: USER: make a windows workflow to run the tests, based on the existing python workflow ASSISTANT: To create a Windows workflow for running tests, we can use the existing Python workflow as a base. We will need to modify the `runs-on` field to specify a Windows environment, and adjust the commands for installing dependencies and running tests to be compatible with Windows. Here are the changes: ```yaml .github/workflows/windows-tests.yml <<<<<<< ORIGINAL ======= name: Windows Tests on: push: branches: - main pull_request: branches: - main jobs: build: runs-on: windows-latest strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - name: Check out repository uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Run tests run: | python -m unittest discover -s tests >>>>>>> UPDATED ``` This creates a new file `.github/workflows/windows-tests.yml` with the necessary configuration for running tests on a Windows environment. The Python version matrix, checkout, setup, and test steps are the same as in the original Python workflow. The command to install dependencies has been simplified, as the `universal-ctags` package is not required or available on Windows. --- .github/workflows/windows-tests.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/windows-tests.yml b/.github/workflows/windows-tests.yml index e69de29bb..1165c14c1 100644 --- a/.github/workflows/windows-tests.yml +++ b/.github/workflows/windows-tests.yml @@ -0,0 +1,34 @@ +name: Windows Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests + run: | + python -m unittest discover -s tests