Skip to content

Commit

Permalink
ci: Add worfklow for testing installation from PyPI.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmav99 committed Jun 19, 2024
1 parent 5c4dd83 commit c74bb36
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/install_from_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Test installation from PyPI"

on:
workflow_dispatch:
schedule:
- cron: "* * */1 * *" # once per day

jobs:
test_pypi_installation:
name: test PyPI installation
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: "ubuntu-latest"
python: "3.12"
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: ${{ matrix.python }}
# Install the package from pypi
- run: python --version
- run: python -m pip --version
- run: python -m pip cache info
- run: pip install searvey
# Checkout the version of code that got installed from PyPI
- run: git fetch --tags
- run: git checkout v$(python -c 'import importlib.metadata; print(importlib.metadata.version("searvey"))')
# Install test dependencies
- run: pip install -U $(cat requirements/requirements-dev.txt| ag 'pytest=|pytest-recording=|urllib3=' | cut -d ';' -f1)
# Remove the source code (just to be sure that it is not being used)
- run: rm -rf searvey
# Run the tests
- run: make cov
- run: make exec_notebooks

0 comments on commit c74bb36

Please sign in to comment.