Merge branch 'main' of github.com:Small-Bodies-Node/sbsearch #63
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
# GitHub Actions workflow for testing and continuous integration. | |
# | |
# This file performs testing using tox and tox.ini to define and configure the test environments. | |
# Remove -numpy126 when we support testing with numpy 2.0 | |
name: CI Tests | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
# branches: # only build on PRs against 'main' if you need to further limit when CI is run. | |
# - main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
ARCH_ON_CI: "normal" | |
IS_CRON: "false" | |
PYTHON_VERSION: "3.11" | |
jobs: | |
s2geometry: | |
uses: ./.github/workflows/s2geometry-venv.yml | |
test: | |
name: CI testing | |
needs: [s2geometry] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ env.PYTHON_VERSION }}" | |
- name: Restore virtual environment from cache | |
uses: actions/cache/restore@v4 | |
id: cache | |
with: | |
key: s2geometry-py${{ steps.setup-python.outputs.python-version }} | |
path: | | |
~/.venv | |
- name: Install code and dependences | |
run: | | |
source ~/.venv/bin/activate | |
which python3 | |
LDFLAGS="-L${VIRTUAL_ENV}/lib -Wl,-rpath=${VIRTUAL_ENV}/lib" CXXFLAGS="-I${VIRTUAL_ENV}/include" python3 -m pip install -e .[test,recommended] | |
- name: Run tests | |
run: | | |
source ~/.venv/bin/activate | |
pip freeze | |
pytest sbsearch -v --cov=sbsearch --cov-report=xml | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |