Skip to content

Commit

Permalink
Add plugin e2e tests and remove cypress (#281)
Browse files Browse the repository at this point in the history
* e2e plugin added; cypress was removed

* upd
comment lines

* Plugin options added

* removed compose file and main.yml

* revert files

* updated config

* updated config file

* pakage file and docker file were upd.

* Update workflows

---------

Co-authored-by: Mikhail Volkov <[email protected]>
  • Loading branch information
vitPinchuk and mikhail-vl authored Apr 17, 2024
1 parent a4aefa5 commit a1e65ef
Show file tree
Hide file tree
Showing 15 changed files with 7,911 additions and 12,187 deletions.
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

0 comments on commit a1e65ef

Please sign in to comment.