From 86a30047e63eedc54f309d71cbbb2c0dfc2ede2e Mon Sep 17 00:00:00 2001 From: vitPinchuk Date: Wed, 27 Nov 2024 08:30:52 +0300 Subject: [PATCH] dev dep added --- .github/workflows/e2e.yml | 36 +++++++++++++++++++++++++++++++++++- docker-compose.yml | 14 ++++++++++++++ package.json | 1 + 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c52b602..ad5164a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -9,7 +9,7 @@ on: - main jobs: - tests: + dev: runs-on: ubuntu-latest steps: @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 4155aa6..47fb0ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: . diff --git a/package.json b/package.json index 82efb34..f189986 100644 --- a/package.json +++ b/package.json @@ -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",