Skip to content

update for v2 port

update for v2 port #55

Workflow file for this run

name: Pull Requests
on:
pull_request:
branches:
- main # Run workflow on PR to main
jobs:
pull_request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: yarn install
- name: Build plugin
run: yarn build
- name: Build plugin for coverage
run: npx @grafana/toolkit@9.3.16 plugin:ci-build
- name: Code Climate
run: |
mkdir -p ccbin/
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./ccbin/cc-test-reporter
chmod +x ./ccbin/cc-test-reporter
yarn global add jest jest-junit
./ccbin/cc-test-reporter format-coverage -t lcov -o out/codeclimate.frontend.json coverage/lcov.info
npx jest --ci --runInBand --reporters=default --reporters=jest-junit
- name: Code Climate Upload
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./ccbin/cc-test-reporter sum-coverage out/codeclimate.*.json -d -p 1 -o out/codeclimate.total.json
./ccbin/cc-test-reporter upload-coverage -i out/codeclimate.total.json