[QA] Component library tests #2
Workflow file for this run
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: e2e component library tests | |
defaults: | |
run: | |
working-directory: vizro-core | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: | |
- main | |
env: | |
PYTHONUNBUFFERED: 1 | |
FORCE_COLOR: 1 | |
PYTHON_VERSION: "3.12" | |
jobs: | |
test-e2e-component-library-vizro-core: | |
name: test-e2e-component-library-vizro-core | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Hatch | |
run: pip install hatch | |
- name: Show dependency tree | |
run: hatch run all.py${{ env.PYTHON_VERSION }}:pip tree | |
- name: Run e2e component library tests | |
run: hatch run all.py${{ env.PYTHON_VERSION }}:test-e2e-component-library | |
- name: Copy failed screenshots | |
if: failure() | |
run: | | |
mkdir /home/runner/work/vizro/vizro/vizro-core/failed_screenshots/ | |
cp *.png failed_screenshots | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: Failed screenshots | |
path: | | |
/home/runner/work/vizro/vizro/vizro-core/failed_screenshots/*.png | |
- name: Send custom JSON data to Slack | |
id: slack | |
uses: slackapi/slack-github-action@v1.26.0 | |
if: failure() | |
with: | |
payload: | | |
{ | |
"text": "Vizro component tests build result: ${{ job.status }}\nBranch: ${{ github.head_ref }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |