Skip to content

Commit

Permalink
Add plugin e2e tests and remove cypress (#66)
Browse files Browse the repository at this point in the history
* Add plugin e2e tests and remove cypress draft

* Updates version and workflow

* Update CHANGELOG.md

* E2E updated

* e2e updated typo

---------

Co-authored-by: Mikhail Volkov <mikhail@volkovlabs.io>
  • Loading branch information
vitPinchuk and mikhail-vl committed Apr 19, 2024
1 parent e1e829b commit 6c0df95
Show file tree
Hide file tree
Showing 13 changed files with 8,241 additions and 12,524 deletions.
7 changes: 5 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ webpack.config.ts

# Development folders
coverage/
cypress/
dist/
websocket/
websocket/

# Playwright tests
playwright.config.ts
test/panel.spec.ts
13 changes: 8 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ 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()
if: ${{ !cancelled() }}
with:
path: |
cypress/videos
cypress/screenshots/actual
name: playwright-report
path: playwright-report/
retention-days: 30
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: E2E Main

on:
push:
branches:
- main
pull_request:
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 @@
# Changelog

## 3.2.0 (IN PROGRESS)

### Features / Enhancements

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

## 3.1.1 (2024-03-03)

### Bug fixes
Expand Down
23 changes: 0 additions & 23 deletions cypress/integration/01-view-panel.test.ts

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/tsconfig.json

This file was deleted.

Loading

0 comments on commit 6c0df95

Please sign in to comment.