Add some choreo errors to kaleido.errors (#312) #29
Workflow file for this run
This file contains hidden or 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/workflows/publish_testpypi.yml | |
--- | |
name: test-n-build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- v* | |
jobs: | |
super-test: | |
strategy: | |
max-parallel: 2 | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python_v: ['3.8', '3.9', '3.10', ''] | |
# chrome_v: ['-1'] | |
defaults: | |
run: | |
working-directory: ./src/py/ | |
name: Build and Test | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v4 | |
- name: Install Dependencies | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get update && sudo apt-get install xvfb | |
timeout-minutes: 1 | |
# must actually checkout for version determination | |
- run: git checkout ${{ github.ref_name }} | |
- run: uv python install ${{ matrix.python_v }} | |
- run: uv python pin ${{ matrix.python_v }} | |
if: ${{ matrix.python_v != '' }} | |
# don't modify sync file! messes up version! | |
- run: uv sync --no-sources --all-extras --frozen # does order matter? | |
- run: uv build | |
- name: Reinstall from wheel | |
run: > | |
uv pip install dist/kaleido-$(uv | |
run --no-sync --with setuptools-git-versioning | |
setuptools-git-versioning)-py3-none-any.whl | |
- run: uv run --no-sync kaleido_get_chrome -v # --i ${{ matrix.chrome_v }} | |
- name: Diagnose | |
run: uv run --no-sync choreo_diagnose --no-run | |
- name: Test mocker | |
run: > | |
uv run | |
--no-sync kaleido_mocker | |
--random 50 | |
--logistro-level INFO | |
--n 1 | |
--timeout 200 | |
--output ${{ github.workspace }}/src/py/integration_tests/renders/ | |
--input ${{ github.workspace }}/src/py/integration_tests/mocks/ | |
- name: Test | |
if: ${{ ! runner.debug && matrix.os != 'ubuntu-latest' }} | |
run: uv run --no-sync poe test | |
timeout-minutes: 8 | |
- name: Test (Linux) | |
if: ${{ ! runner.debug && matrix.os == 'ubuntu-latest' }} | |
run: xvfb-run uv run --no-sync poe test | |
timeout-minutes: 8 | |
- name: Test (Debug) | |
if: runner.debug | |
run: uv run --no-sync poe debug-test | |
timeout-minutes: 20 | |
- name: Test (Debug, Linux) | |
if: ${{ runner.debug && matrix.os == 'ubuntu-latest' }} | |
run: xvfb-run uv run --no-sync poe debug-test | |
timeout-minutes: 8 | |
testpypi-publish: | |
defaults: | |
run: | |
working-directory: ./src/py/ | |
name: Upload release to TestPyPI | |
needs: super-test | |
if: | | |
always() && | |
!cancelled() && | |
!failure() && | |
startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
environment: | |
name: testpypi | |
url: https://test.pypi.org/p/kaleido_test | |
# Signs this workflow so pypi trusts it | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version-file: "./src/py/pyproject.toml" | |
- run: git checkout ${{ github.ref_name }} | |
- run: uv sync --no-sources --frozen --all-extras | |
- run: uv build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/. | |
packages-dir: src/py/dist | |
verbose: true |