chore: exclude sensitive and irrelevant args from text projection hash #212
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
| name: CI Build | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| inputs: | |
| publish_pages: | |
| description: "Publish Documentation Website" | |
| required: false | |
| type: boolean | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "24" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Set up emsdk | |
| uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| version: 4.0.13 | |
| - name: Set up Rust for WebAssembly | |
| run: | | |
| rustup target add wasm32-unknown-unknown | |
| cargo install -f wasm-bindgen-cli --version 0.2.100 | |
| - name: Set up uv package manager | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| run: npm ci | |
| - uses: actions/cache@v4 | |
| id: cache-demo-data | |
| with: | |
| path: packages/docs/demo-data | |
| key: ${{ runner.os }}-${{ hashFiles('packages/docs/generate_demo_data.py') }} | |
| - name: Generate demo data | |
| if: steps.cache-demo-data.outputs.cache-hit != 'true' | |
| run: cd packages/docs && uv run generate_demo_data.py | |
| - name: Build WASM modules | |
| run: ./scripts/build_wasm.sh | |
| - name: Build JavaScript and Python packages | |
| run: npm run build | |
| - name: Run type checks | |
| run: npm run check | |
| - name: Run tests | |
| run: npm run test | |
| - name: Upload node package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: node-dist | |
| path: packages/embedding-atlas/ | |
| - name: Upload python package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-dist | |
| path: packages/backend/dist/ | |
| - name: Upload docs artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: packages/docs/.vitepress/dist/ | |
| test-python: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Download wheel | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-dist | |
| path: dist/ | |
| - name: Install wheel | |
| run: pip install dist/*.whl | |
| - name: Run tests | |
| run: | | |
| embedding-atlas --help | |
| python -c "import embedding_atlas" | |
| python -c "from embedding_atlas.projection import compute_text_projection, compute_image_projection, compute_vector_projection" | |
| pip install jupyterlab anywidget | |
| python -c "from embedding_atlas.widget import EmbeddingAtlasWidget" | |
| pip install streamlit | |
| python -c "from embedding_atlas.streamlit import embedding_atlas" | |
| publish-pypi: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' | |
| needs: | |
| - build | |
| permissions: | |
| id-token: write | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/embedding-atlas | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-dist | |
| path: dist/ | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ | |
| publish-npmjs: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' | |
| needs: | |
| - build | |
| permissions: | |
| contents: read | |
| id-token: write | |
| environment: | |
| name: npmjs | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: node-dist | |
| path: package/ | |
| - run: cd package && npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-pages: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' || inputs.publish_pages == true | |
| needs: | |
| - build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |