Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 66 additions & 4 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,46 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest] # [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest] # [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup WSL (Windows)
if: startsWith(matrix.os, 'windows')
uses: Vampire/setup-wsl@v3
with:
distribution: Ubuntu-22.04
wsl-shell-command: bash
- name: Setup Python on WSL
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
pwd
sudo apt-get update -y
sudo apt-get install -y python3-pip
sudo apt-get install -y python3.10-venv
- name: Update WSL (Windows)
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y lsb-release curl gpg
- name: Fetch Redis gpg (Windows)
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
- name: Configure Redis gpg (Windows)
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
- name: Install Redis (Windows)
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y redis && sleep 5 && sudo service redis-server stop
- name: Update Ubuntu and Install Dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
Expand All @@ -51,7 +85,17 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies (Windows)
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
python3 -m pip install --upgrade pip build
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
python -m pip install --upgrade pip build
- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos')
run: |
python -m pip install --upgrade pip build
- name: Install package (Ubuntu)
Expand All @@ -62,8 +106,26 @@ jobs:
if: startsWith(matrix.os, 'macos')
run: |
pip install -e .[tests,lint]

- name: Test with pytest
- name: Install package (Windows)
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install build
python3 -m pip install flake8 pytest
python3 -m build
python3 -m pip install -e .[tests,lint] --no-binary pyzmq
- name: Test with pytest (Windows)
if: startsWith(matrix.os, 'windows')
shell: wsl-bash {0}
run: |
python3 -m pytest --cov=improv
- name: Test with pytest (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
python -m pytest --cov=improv
- name: Test with pytest (macOS)
if: startsWith(matrix.os, 'macos')
run: |
python -m pytest --cov=improv

Expand Down