[Backport release_3_6] Dataviz - Do not display child plot in Popup when there is no data #1954
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: "🎳 End2end" | |
on: | |
pull_request: | |
types: [ labeled, opened, synchronize, reopened ] | |
branches: | |
- master | |
- release_3_* | |
schedule: | |
# Run every monday at 3:00 | |
- cron: '0 3 * * 1' | |
workflow_dispatch: | |
jobs: | |
end2end: | |
# The first condition is triggered when we set the new label | |
# The second one when we update the PR with new commits without changing labels | |
# The third one when it's a cron job | |
# The fourth one is for the manual button | |
if: | | |
github.event.label.name == 'run end2end' || | |
contains(github.event.pull_request.labels.*.name, 'run end2end') || | |
github.event_name == 'schedule' || | |
github.event_name == 'workflow_dispatch' | |
name: "End-to-end" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: tests | |
env: | |
CYPRESS_CI: TRUE | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Branch name | |
run: echo running on branch ${GITHUB_REF##*/} with CYPRESS = ${CYPRESS_CI} | |
- name: Install Lizmap as a QGIS Server plugin | |
run: make build-plugins | |
- name: Show Lizmap environment and versions | |
# Not available in QGIS 3.16, which is used in LWC 3.5 | |
if: ${{ env.BRANCH != 'release_3_5' }} | |
run: make show-qgis-server-versions && make env && cat .env | |
- name: Pull docker images | |
run: ./run-docker pull | |
# In this step, this action saves a list of existing images, | |
# the cache is created without them in the post run. | |
# It also restores the cache if it exists. | |
- uses: satackey/[email protected] | |
# Ignore the failure of a step and avoid terminating the job. | |
continue-on-error: true | |
- name: Build and start docker images | |
run: ./run-docker up --build -d | |
- name: Wait docker images ready and install Lizmap | |
run: sleep 30 && ./lizmap-ctl install | |
- name: Load SQL data | |
run: cd qgis-projects/tests && ./load_sql.sh | |
- name: Add hosts to /etc/hosts | |
run: | | |
sudo echo "127.0.0.1 othersite.local" | sudo tee -a /etc/hosts | |
# Playwright | |
- uses: actions/setup-node@v3 | |
- name: Install dependencies | |
run: cd end2end && npm ci | |
- name: Install Playwright | |
# No Playwright tests in LWC 3.5 | |
if: ${{ env.BRANCH != 'release_3_5' }} | |
run: cd end2end && npx playwright install --with-deps chromium | |
- name: Run Playwright tests | |
# No Playwright tests in LWC 3.5 | |
if: ${{ env.BRANCH != 'release_3_5' }} | |
run: cd end2end && npx playwright test --project=chromium | |
- name: Upload test results | |
if: failure() | |
uses: actions/[email protected] | |
with: | |
name: playwright-report | |
path: playwright-report | |
# Install NPM dependencies, cache them correctly | |
# and run all Cypress tests | |
- name: Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
browser: chrome | |
working-directory: tests/end2end | |
spec: cypress/integration/*-ghaction.js | |
wait-on: http://localhost:8130 | |
- name: Save screenshots as artifacts if a test fails to ease debug | |
uses: actions/[email protected] | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: | | |
tests/end2end/cypress/screenshots | |
tests/end2end/cypress/downloads | |
# debug: | |
# name: "Debug" | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Dump GitHub context | |
# env: | |
# GITHUB_CONTEXT: ${{ toJson(github) }} | |
# run: | | |
# echo "$GITHUB_CONTEXT" |