Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin e2e tests and remove cypress #281

Merged
merged 9 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ webpack.config.ts
coverage/
cypress/
dist/
websocket/
websocket/

# Playwright tests
playwright.config.ts
test/panel.spec.ts
12 changes: 4 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ jobs:
- name: Build
run: npm run build

- name: Setup playwright browser
run: npx playwright install --with-deps chromium

- name: Start Grafana
run: docker-compose up -d

- name: Run e2e tests
run: npm run e2e
run: npm run test:e2e

- name: Stop Grafana
run: docker-compose down

- uses: actions/upload-artifact@v4
if: failure()
with:
path: |
cypress/videos
cypress/screenshots/actual
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Daily E2E using Grafana Main

on:
push:
branches:
- main

schedule:
- cron: '0 0 * * *'

workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Sign plugin
run: npm run sign
env:
GRAFANA_ACCESS_POLICY_TOKEN: ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}

- name: Setup playwright browser
run: npx playwright install --with-deps chromium

- name: Start Grafana
run: docker-compose -f test/docker-compose.yml up -d

- name: Run e2e tests
run: npm run test:e2e

- name: Stop Grafana
run: docker-compose down
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ e2e-results/
.idea
.DS_Store

# Cypress
cypress/report.json
cypress/videos/
cypress/screenshots/actual
# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 6.1.0 (IN PROGRESS)

### Features / Enhancements

- Add plugin e2e tests and remove cypress (#281)

## 6.0.0 (2024-03-24)

### Breaking changes
Expand Down
46 changes: 0 additions & 46 deletions cypress/integration/01-view-panel.test.ts

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions cypress/tsconfig.json

This file was deleted.

Loading
Loading