Skip to content

test python sdist

test python sdist #9

# example of a job ported from finos/perspective build.yaml
name: test python sdist
on:
workflow_dispatch:
inputs:
run_url:
description: "github actions run to pull artifacts from"
required: true
jobs:
test_python_sdist:
# needs: [build_and_test_jupyterlab]
environment: urdrome
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- windows-2019
arch:
- x86_64
python-version:
- 3.9
steps:
# NB: this checkout is incoherent - it should use the same repo/ref that
# triggered the action run
# the checkout is only used for the config/install-deps actions
- name: Checkout
uses: actions/checkout@v4
with:
repository: finos/perspective
ref: v3.1.3
- name: Config
id: config-step
uses: finos/perspective/.github/actions/config@v3.1.3
- name: Initialize Build
uses: finos/perspective/.github/actions/install-deps@v3.1.3
with:
rust: "true"
cpp: "true"
python: "true"
javascript: "false"
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
- uses: tomjakubowski/perspective-oneoff-tests/.github/actions/download-remote-artifact@${{github.ref}}

Check failure on line 47 in .github/workflows/test_python_sdist.yml

View workflow run for this annotation

GitHub Actions / test python sdist

Invalid workflow file

The workflow is not valid. .github/workflows/test_python_sdist.yml (Line: 47, Col: 15): Unrecognized named-value: 'github'. Located at position 1 within expression: github.ref
with:
name: perspective-rust
path: crates/
run_url: ${{ inputs.run_url }}
github-token: ${{ secrets.GH_TOKEN }}
- uses: ./.github/actions/download-remote-artifact
with:
name: perspective-python-sdist
run_url: ${{ inputs.run_url }}
github-token: ${{ secrets.GH_TOKEN }}
# The sdist depends on perspective-{client,server} crates published to
# crates.io. Patch the build to instead use .crate artifacts built
# previously in the workflow
- name: Set up path overrides for perspective .crate contents
run: |
(cd crates && tar xvf perspective-client-*.crate && tar xvf perspective-server-*.crate)
CLIENT_CRATE_ROOT=$(ls -d "$PWD"/crates/perspective-client-*/ | head -n 1)
SERVER_CRATE_ROOT=$(ls -d "$PWD"/crates/perspective-server-*/ | head -n 1)
mkdir -p $HOME/.cargo
cat > $HOME/.cargo/config.toml <<EOF
[patch.crates-io]
perspective-client = { path = "$CLIENT_CRATE_ROOT" }
perspective-server = { path = "$SERVER_CRATE_ROOT" }
EOF
- name: Install perspective-python sdist
run: python -m pip install -vv ./perspective*.tar.gz
- name: Verify labextension
run: |
jupyter labextension list --debug
jupyter labextension list 2>&1 | grep '@finos/perspective-jupyterlab'
- name: Run import test
run: python -c 'import perspective'
- name: Run pytests
run: pytest -v --pyargs 'perspective.tests'