Skip to content

Commit

Permalink
dev dep added
Browse files Browse the repository at this point in the history
  • Loading branch information
vitPinchuk committed Nov 27, 2024
1 parent da91b1a commit 86a3004
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
36 changes: 35 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

jobs:
tests:
dev:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -42,3 +42,37 @@ jobs:
name: playwright-report
path: playwright-report/
retention-days: 30

dependency:
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: Start Grafana
run: docker compose --profile dependency up -d

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

- name: Stop Grafana
run: docker compose down

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-dependency
path: playwright-report/
retention-days: 30
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ services:
profiles:
- main

grafana-dep:
image: grafana/grafana:10.0.0
ports:
- 3000:3000/tcp
environment:
- GF_DEFAULT_APP_MODE=development
- GF_USERS_DEFAULT_THEME=light
- GF_INSTALL_PLUGINS=marcusolsson-static-datasource,golioth-websocket-datasource,yesoreyeram-infinity-datasource
volumes:
- ./dist:/var/lib/grafana/plugins/volkovlabs-image-panel
- ./provisioning:/etc/grafana/provisioning
profiles:
- dependency

test:
build:
context: .
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"sign": "npx --yes @grafana/sign-plugin@latest",
"start": "docker compose pull grafana && docker compose --profile dev up",
"start:main": "docker compose pull grafana-main && docker compose --profile main up",
"start:dep": "docker compose pull grafana-dep && docker compose --profile dependency up",
"stop": "docker compose down",
"stop:e2e": "docker compose -f test/docker compose.yml down",
"test": "jest --watch --onlyChanged",
Expand Down

0 comments on commit 86a3004

Please sign in to comment.