Skip to content

use getptr a lot less #835

use getptr a lot less

use getptr a lot less #835

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- '*'
jobs:
julia:
name: Test Julia (${{ matrix.jlversion }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
arch: [x64] # x86 unsupported by MicroMamba
os: [ubuntu-latest, windows-latest, macos-latest]
jlversion: ['1','1.9']
steps:
- uses: actions/checkout@v4
- name: Set up Julia ${{ matrix.jlversion }}
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.jlversion }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- name: Build package
uses: julia-actions/julia-buildpkg@v1
- name: Run tests
uses: julia-actions/julia-runtest@v1
env:
JULIA_DEBUG: PythonCall
JULIA_NUM_THREADS: '2'
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
python:
name: Test Python (${{ matrix.pyversion }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
pyversion: ["3", "3.13.2", "3.13.1", "3.13.0", "3.12", "3.8"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyversion }}
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.pyversion }}
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: '1'
- name: Install dependencies
run: |
cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json
uv sync --dev
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
uv run flake8 ./pysrc ./pytest --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
uv run flake8 ./pysrc ./pytest --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests
run: |
uv run pytest -s --nbval --cov=pysrc ./pytest/
env:
PYTHON_JULIACALL_THREADS: '2'
PYTHON_JULIACALL_HANDLE_SIGNALS: 'yes'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Setup tmate session on failure
uses: mxschmitt/action-tmate@v3
if: ${{ failure() }}
with:
limit-access-to-actor: true