Skip to content

Commit

Permalink
ci: enable testing for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kantord committed Sep 7, 2023
1 parent 6033e9e commit 1edae8e
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: pytest

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: ['3.11']

steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install ripgrep
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb
sudo dpkg -i ripgrep_13.0.0_amd64.deb
elif [ "${{ matrix.os }}" == "windows-latest" ]; then
choco install ripgrep
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install ripgrep
fi
- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies on macOS
if: runner.os == 'macOS'
run: |
export HNSWLIB_NO_NATIVE=1
arch -x86_64 poetry install --no-interaction --no-root
- name: Install dependencies on other OS
if: runner.os != 'macOS'
run: |
export HNSWLIB_NO_NATIVE=1
poetry install --no-interaction --no-root
- name: Run pytest
run: |
poetry run pytest tests/test_repository.py -vvs --timeout=60

0 comments on commit 1edae8e

Please sign in to comment.