Skip to content

[QA] Component library tests #7

[QA] Component library tests

[QA] Component library tests #7

name: Integration tests Component Library
defaults:
run:
working-directory: vizro-core
on:
push:
branches: [main]
pull_request:
branches:
- main
env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
jobs:
test-component-library-vizro-core:
name: test-component-library-vizro-core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Hatch
run: pip install hatch
- name: Show dependency tree
run: hatch run tests:pip tree
- name: Run integration tests
run: hatch run tests:test-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/[email protected]
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