-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |