Skip to content

Commit

Permalink
Merge branch 'main' into chore/adding-page-selectors-grafana-8
Browse files Browse the repository at this point in the history
  • Loading branch information
tolzhabayev authored Nov 29, 2024
2 parents f816d3c + 086586e commit af2962a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": ["src/module.{js,ts,tsx}"],
"project": ["src/**/*", "tests/**/*", ".config/**/*"],
"eslint": {
"config": [".config/.eslintrc", "./.eslintrc"]
},
"webpack": {
"config": [".config/webpack/webpack.config.ts"]
}
}
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
run: |
mkdir ./packed-artifacts
npm pack --workspace="@grafana/create-plugin" --workspace="@grafana/sign-plugin" --pack-destination="./packed-artifacts"
cp ./.github/knip.json ./packed-artifacts
- name: Upload artifacts for testing
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -199,6 +200,16 @@ jobs:
run: sign-plugin --rootUrls http://www.example.com --signatureType private
working-directory: ./${{ matrix.workingDir }}

- name: Frontend Knip Report
if: ${{ github.actor != 'dependabot[bot]' }}
# Knip uses the scaffolded plugin .gitignore file for ignore paths.
# github workflows use paths like home/runner/work/plugin-tools/plugin-tools
# so we need to remove /work otherwise knip returns false positives
run: |
sed -i '/^work\/$/d' .gitignore
npx -y knip --config ../packed-artifacts/knip.json --reporter markdown --no-exit-code
working-directory: ./${{ matrix.workingDir }}

release:
runs-on: ubuntu-latest
needs: [test, generate-plugins]
Expand Down

0 comments on commit af2962a

Please sign in to comment.