mirror of
https://github.com/Aider-AI/aider
synced 2026-05-15 11:26:23 +02:00
aider: Added Windows image for running tests and modified the 'Install universal ctags' step to work on both Ubuntu and Windows.
# Context:
USER: can we add a github action to also run tests on a windows image?
ASSISTANT: Sure, to add a GitHub action to run tests on a Windows image, we need to modify the GitHub actions workflow file. This file is usually located in the `.github/workflows` directory and has a `.yml` or `.yaml` extension.
Could you please provide the *read-write* access to the GitHub actions workflow file?
USER: I added these *read-write* files: .github/workflows/python-tests.yml
ASSISTANT: Great! We will modify the `.github/workflows/python-tests.yml` file to add a Windows image for running tests.
Here are the steps:
1. Add 'windows-latest' to the `runs-on` field under the `strategy` section. This will ensure that the tests are run on both Ubuntu and Windows environments.
Here is the *edit block* for the change:
```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
=======
jobs:
build:
runs-on: [ubuntu-latest, windows-latest]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
>>>>>>> UPDATED
```
2. Modify the 'Install universal ctags' step to work on both Ubuntu and Windows. For Windows, we will use Chocolatey to install universal ctags.
Here is the *edit block* for the change:
```yaml
.github/workflows/python-tests.yml
<<<<<<< ORIGINAL
- name: Install universal ctags
run: |
sudo apt-get update
sudo apt-get install -y universal-ctags
=======
- name: Install universal ctags
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
choco install universal-ctags
else
sudo apt-get update
sudo apt-get install -y universal-ctags
fi
>>>>>>> UPDATED
```
Please review these changes and let me know if they are acceptable.
This commit is contained in:
10
.github/workflows/python-tests.yml
vendored
10
.github/workflows/python-tests.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: [ubuntu-latest, windows-latest]
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
||||
@@ -26,8 +26,12 @@ jobs:
|
||||
|
||||
- name: Install universal ctags
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y universal-ctags
|
||||
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||
choco install universal-ctags
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y universal-ctags
|
||||
fi
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user