Skip to content

Commit

Permalink
Merge pull request #1 from jackw/jackw/add-tests
Browse files Browse the repository at this point in the history
Feature: Add alternative light designs and introduce unit and integration tests
  • Loading branch information
jackw authored Mar 1, 2024
2 parents 1bb9beb + cf92acd commit 7cf2cb6
Show file tree
Hide file tree
Showing 19 changed files with 8,441 additions and 12,110 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,31 @@ jobs:
- name: Check for E2E
id: check-for-e2e
run: |
if [ -d "cypress" ]
if [ -f "playwright.config.ts" ]
then
echo "has-e2e=true" >> $GITHUB_OUTPUT
fi
- name: Install Playwright Browsers
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: npx playwright install --with-deps

- name: Start grafana docker
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: docker-compose up -d

- name: Wait for grfana server
if: steps.check-for-e2e.outputs.has-e2e == 'true'
uses: nev7n/wait_for_response@v1
with:
url: 'http://localhost:3000/'
responseCode: 200
timeout: 60000
interval: 500

- name: Run e2e tests
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: npm run e2e
run: npm run test:playwright

- name: Stop grafana docker
if: steps.check-for-e2e.outputs.has-e2e == 'true'
Expand All @@ -87,8 +100,8 @@ jobs:
uses: actions/upload-artifact@v4
if: steps.check-for-e2e.outputs.has-e2e == 'true' && steps.run-e2e-tests.outcome != 'success'
with:
name: cypress-videos
path: cypress/videos
name: playwright-report
path: playwright-report/
retention-days: 5

- name: Sign plugin
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ e2e-results/
# Editor
.idea

.eslintcache
.eslintcache
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
10 changes: 0 additions & 10 deletions cypress/integration/01-smoke.spec.ts

This file was deleted.

Loading

0 comments on commit 7cf2cb6

Please sign in to comment.