Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,125 +13,125 @@

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
e2e-matrix: ${{ steps.resolve-versions.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- name: Setup Node.js environment
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'

- name: Cache node_modules for future jobs
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: npm ci

- name: Check types
run: npm run typecheck
- name: Lint
run: npm run lint
- name: Unit tests
run: npm run test:ci
- name: Build frontend
run: npm run build

- name: Check for backend
id: check-for-backend
run: |
if [ -f "Magefile.go" ]
then
echo "has-backend=true" >> $GITHUB_OUTPUT
fi

- name: Setup Go environment
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'

- name: Test backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v2
with:
version: latest
args: coverage

- name: Build backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v2
with:
version: latest
args: buildAll

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

- name: Resolve Grafana E2E versions
id: resolve-versions
uses: grafana/plugin-actions/e2e-version@e2e-version/v1.2.1
with:
skip-grafana-react-19-preview-image: false

e2e:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 15
needs: build
strategy:
fail-fast: false
matrix:
GRAFANA_IMAGE: ${{ fromJson(needs.build.outputs.e2e-matrix) }}
QUICKWIT_VERSION: [edge]
steps:
- uses: actions/checkout@v6

- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Restore executable permissions
run: chmod +x dist/gpx_quickwit_*

- name: Setup Node.js environment
uses: actions/setup-node@v6
with:
node-version: '22'

- name: Restore node_modules
uses: actions/cache/restore@v4
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install Playwright
run: npx playwright install --with-deps chromium

- name: Start Grafana (${{ matrix.GRAFANA_IMAGE.name }}:${{ matrix.GRAFANA_IMAGE.version }}) + Quickwit (${{ matrix.QUICKWIT_VERSION }})
run: docker compose up -d --build
env:
GRAFANA_VERSION: ${{ matrix.GRAFANA_IMAGE.version }}
GRAFANA_IMAGE: ${{ matrix.GRAFANA_IMAGE.name }}
QUICKWIT_VERSION: ${{ matrix.QUICKWIT_VERSION }}

- name: Wait for Grafana and Quickwit to start
run: |
timeout 60 bash -c 'until curl -sf http://localhost:3000/api/health; do sleep 2; done' || { docker compose logs grafana; exit 1; }
timeout 60 bash -c 'until curl -sf http://localhost:7280/health/readyz; do sleep 2; done' || { docker compose logs quickwit; exit 1; }

- name: Run e2e tests
run: npm run e2e

- name: Stop Grafana
if: always()
run: docker compose down

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 1 addition & 1 deletion .github/workflows/is-compatible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@

jobs:
compatibilitycheck:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Node.js environment
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build plugin
run: npm run build
- name: Compatibility check
uses: grafana/plugin-actions/is-compatible@8e19900577d14a8ac66c5e8299ce51522590c219
with:
module: 'src/module.ts'
comment-pr: 'no'
fail-if-incompatible: 'no'
targets: '@grafana/data,@grafana/ui,@grafana/runtime,@grafana/e2e-selectors'

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: write
id-token: write
Expand Down
Loading