[Bot] Update static files #1542
This file contains 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: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "vizro-core/**" | |
- "vizro-ai/**" | |
defaults: | |
run: | |
working-directory: vizro-core | |
env: | |
PYTHON_VERSION: "3.12" | |
jobs: | |
build-whl: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Hatch | |
run: pip install hatch | |
- name: Build vizro-core package | |
run: hatch build -t wheel | |
- name: Upload vizro-core artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pip | |
path: vizro-core/dist/*.whl | |
retention-days: 14 | |
- name: Build vizro-ai package | |
working-directory: vizro-ai | |
run: hatch build -t wheel | |
- name: Upload vizro-ai artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pip2 | |
path: vizro-ai/dist/*.whl | |
retention-days: 14 | |
# The below can be commented out in order to dry run the test creation of the PyCafe links | |
# Once satisfied, comment them again, because the actual links will be created by the pycafe-dashboards.yml workflow | |
# which is run from the main branch | |
############### Start of PyCafe links creation ############### | |
# - name: Install Playwright and browser | |
# run: | | |
# hatch run pip install playwright | |
# hatch run playwright install --with-deps chromium | |
# - name: Install vizro-ai in editable mode # This makes vizro-ai present in env to get the version | |
# run: | | |
# hatch run pip install -e ../vizro-ai | |
# - name: Print PR Number | |
# run: | | |
# echo "Pull Request Number: ${{ github.event.workflow_run.pull_requests[0].number }}" | |
# - name: Test PyCafe links | |
# run: | | |
# hatch run python ../tools/pycafe/test_pycafe_links.py --github-token ${{ github.token }} --repo-name ${{ github.repository }} --run-id ${{ github.run_id }} --commit-sha ${{ github.sha }} | |
# - name: Create PyCafe links | |
# run: | | |
# PR_NUMBER=${{ github.event.workflow_run.pull_requests[0].number || '' }} | |
# if [ -n "$PR_NUMBER" ]; then | |
# hatch run python ../tools/pycafe/create_pycafe_links_comments.py --github-token ${{ github.token }} --repo-name ${{ github.repository }} --pr-number $PR_NUMBER --run-id ${{ github.run_id }} --commit-sha ${{ github.sha }} | |
# else | |
# hatch run python ../tools/pycafe/create_pycafe_links_comments.py --github-token ${{ github.token }} --repo-name ${{ github.repository }} --run-id ${{ github.run_id }} --commit-sha ${{ github.sha }} | |
# fi | |
############## End of PyCafe links creation ############### |