Skip to content

normalize values

normalize values #178

Workflow file for this run

name: ci
on: [push]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Download WASM binary
run: ./scripts/download-wasm.sh
- name: Install dependencies
run: poetry install --extras datastream
- name: Compile
run: poetry run mypy .
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Download WASM binary
run: ./scripts/download-wasm.sh
- name: Install dependencies
run: poetry install --extras datastream
- name: Test
run: poetry run pytest -rP -n auto .
verify-package:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Download WASM binary
run: ./scripts/download-wasm.sh
- name: Build package
run: poetry build
- name: Verify WASM in wheel
run: |
if ! zipinfo dist/*.whl | grep -q 'rulesengine.wasm'; then
echo "ERROR: rulesengine.wasm not found in wheel"
echo "Wheel contents:"
zipinfo dist/*.whl
exit 1
fi
echo "Verified: rulesengine.wasm is included in the wheel"
publish:
needs: [compile, test, verify-package]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Download WASM binary
run: ./scripts/download-wasm.sh
- name: Install dependencies
run: poetry install
- name: Publish to pypi
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}