Bump @grafana/runtime from 9.2.5 to 10.4.15 #256
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
release: | |
types: [released, prereleased] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable --prefer-offline | |
- name: Check types | |
run: yarn typecheck | |
- name: Lint | |
run: yarn lint | |
- name: Unit tests | |
run: yarn test:ci | |
e2e-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable --prefer-offline | |
- name: Build dependencies | |
run: yarn build | |
- name: Start Grafana container | |
run: docker compose --file compose.yaml up --detach | |
- name: Run e2e tests | |
run: yarn e2e | |
- name: Stop Grafana container | |
run: docker compose --file compose.yaml down | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- tests | |
- e2e-tests | |
if: ${{ github.event_name == 'release' && contains(fromJSON('["released", "prereleased"]'), github.event.action) }} | |
env: | |
FILENAME: embraceio-metric-app-${{ github.event.release.tag_name }}.zip | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
# - name: Update version in package.json and plugin.json | |
# run: | | |
# sed -i 's/"version": "0.0.0"/"version": "${{ github.event.release.tag_name }}"/g' package.json src/plugin.json | |
- name: Install dependencies | |
run: yarn install --pure-lockfile | |
- name: Build dependencies | |
run: yarn build | |
- name: Sign Grafana plugin | |
run: npx @grafana/sign-plugin | |
env: | |
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }} | |
- name: Rename dist directory | |
run: mv dist/ embraceio-metric-app/ | |
- name: Zip app directory | |
run: zip -r $FILENAME ./embraceio-metric-app | |
- name: Generate MD5 hash file | |
run: echo "$(md5sum ./$FILENAME | awk '{print $1}')" > md5.txt | |
- name: Upload release | |
run: gh release upload "${{ github.event.release.tag_name }}" $FILENAME md5.txt --clobber | |
env: | |
GH_TOKEN: ${{ github.token }} |