-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (57 loc) · 1.75 KB
/
ci-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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 }}