TileDB-SOMA Python CI (remote storage) #45
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
name: TileDB-SOMA Python CI (remote storage) | ||
on: | ||
# Not for regular use, but you can uncomment this when putting up PRs on this | ||
# file. Just remember to take it back out. There's no need to run | ||
# remote-storage tests on every single PR push to our repo. | ||
# | ||
# pull_request: | ||
# | ||
# Allows for 'as needed' manual trigger: | ||
workflow_dispatch: | ||
# | ||
# Use a regular nighly build as well (time is UTC): | ||
schedule: | ||
- cron: "25 5 * * *" | ||
env: | ||
# Don't name this "TILEDB_REST_TOKEN" since that will map into a core | ||
# env/config override, as if config key "rest.token" had been set. One of the | ||
# purposes of this CI is to run tests where all config is passed via context | ||
# arguments and none via environment variables, in order to flush out | ||
# callsites within the code which aren't passing context as they should. | ||
TILEDB_REST_UNITTEST_TOKEN: ${{ secrets.TILEDB_REST_UNITTEST_TOKEN}} | ||
jobs: | ||
ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# This could be run on MacOS too, but, we have enough OS redundancy, | ||
# and MacOS-runner availability is a more tightly constrained resource | ||
# in GitHub Actions as of 2025-02-06. | ||
- name: linux | ||
os: ubuntu-24.04 | ||
# TO DO: also on 3.12. But 3.9 is higher-pri, until we drop support | ||
# for it. (Note our main CI run tests across a broader set of Python | ||
# versions.) | ||
python_version: 3.9 | ||
cc: gcc-13 | ||
cxx: g++-13 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Show matrix OS | ||
run: echo "matrix.os:" ${{ matrix.os }} | ||
- name: Linux CPU info | ||
if: ${{ matrix.os == 'ubuntu-24.04' }} | ||
run: cat /proc/cpuinfo | ||
- name: MacOS CPU info | ||
if: ${{ matrix.os == 'macOS-latest' }} | ||
run: sysctl -a | grep cpu | ||
- name: Select XCode version | ||
if: startsWith(matrix.os, 'macos') | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '15.4' | ||
- name: Set up Python ${{ matrix.python_version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
cache: pip | ||
cache-dependency-path: ./apis/python/setup.py | ||
- name: Show XCode version | ||
run: clang --version | ||
- name: Check out TileDB-SOMA | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # ensure we get all tags to inform package version determination | ||
- name: Log pip dependencies | ||
run: pip list | ||
- name: Install tiledbsoma | ||
# If you'reiterating on the testing framework itself, install from PyPI to avoid the | ||
# time-consuming build. If you're trying to evaluate the code modified by a PR, | ||
# install from source. | ||
# | ||
# From PyPI: | ||
# run: pip install tiledbsoma==1.15.7 | ||
# | ||
# From source: | ||
run: pip -v install -e apis/python[all] -C "--build-option=--no-tiledb-deprecated" | ||
# | ||
env: | ||
CC: ${{ matrix.cc }} | ||
CXX: ${{ matrix.cxx }} | ||
- name: Install dependencies | ||
run: pip install --prefer-binary pytest typeguard tiledb.cloud | ||
- name: Show package versions | ||
run: python scripts/show-versions.py | ||
- name: Show tiledb.cloud version | ||
run: python -c 'import tiledb.cloud; print(tiledb.cloud.version.version)' | ||
- name: Run pytests for Python | ||
shell: bash | ||
run: python -m pytest apis/python/remote_tests -v --durations=20 --maxfail=50 | ||
# File a bug report if anything fails, but don't file tickets for manual runs | ||
# -- only for scheduled ones. | ||
create_issue_on_fail: | ||
needs: [ci] | ||
Check failure on line 114 in .github/workflows/python-remote-storage.yml
|
||
if: (failure() || cancelled()) && github.event_name != 'workflow_dispatch' | ||
steps: | ||
- name: Checkout TileDB-SOMA `main` | ||
uses: actions/checkout@v2 | ||
- name: Create Issue if Build Fails | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
filename: .github/workflows/daily-remote-tests-issue-template.md |